home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MPW 411 / ResourcesHelp < prev    next >
Encoding:
Text File  |  1990-07-19  |  278.9 KB  |  5,747 lines  |  [TEXT/MPS ]

  1. æKY CopyrightNotice
  2. æC  Copyright Apple Computer, Inc. 1985-1989, All rights reserved.
  3. 411 - Resources Help - MPW 3.2 Beta Release.
  4. Monday, May 14, 1990 8:44:57 AM
  5.  
  6. æKY Help
  7. ResourcesHelp
  8. æKL actb
  9. acur
  10. ALRT
  11. BNDL
  12. cctb
  13. cicn
  14. clut
  15. cmdo
  16. CNTL
  17. crsr
  18. CURS
  19. dctb
  20. DITL
  21. DLOG
  22. DRVR
  23. DRVW
  24. fctb
  25. finf
  26. FOND
  27. FONT
  28. FREF
  29. FWID
  30. ICON
  31. ICN#
  32. insc
  33. INTL0
  34. itl0
  35. INTL1
  36. itl1
  37. itl2
  38. itl4
  39. itlb
  40. itlc
  41. itlk
  42. KCAP
  43. KCHR
  44. KMAP
  45. KSWP
  46. MBAR
  47. mcky
  48. mctb
  49. MENU
  50. mppc
  51. mxbc
  52. mxbi
  53. mxbm
  54. mxwt
  55. NFNT
  56. nrct
  57. PAT 
  58. PAT#
  59. PICT
  60. pltt
  61. ppat
  62. ROv#
  63. scrn
  64. SICN
  65. SIZE
  66. snd 
  67. STR 
  68. STR#
  69. wctb
  70. WIND
  71.  
  72. Resources
  73. æKY Resources
  74. æC                                                    Rez             ResEdit  
  75. actb • Alert Color Lookup Table...................Types.r.........Editor
  76. acur • 
  77. ALRT • Alert Template.............................Types.r.........Editor
  78. BNDL • Bundle.....................................Types.r.........Editor
  79. cctb • Control Color Lookup Table.................Types.r.........Editor
  80. cicn • Color Icon.................................Types.r.........General
  81. clut • Generic Color Lookup Table.................Types.r.........Editor
  82. cmdo • For MPW commando interface.................Cmdo.r..........Editor
  83. CNTL • Control Template...........................Types.r.........Editor
  84. crsr • Color Cursor...............................Types.r.........General
  85. CURS • Cursor.....................................Types.r.........Editor
  86. dctb • Dialog Color Lookup Table..................Types.r.........Editor
  87. DITL • Dialog Item List...........................Types.r.........Editor
  88. DLOG • Dialog Template............................Types.r.........Editor
  89. DRVR • Driver.....................................SysTypes.r......Editor
  90. fctb • Font Color Lookup Table....................Types.r.........Editor
  91. finf • Font information...........................SysTypes.r......Editor
  92. FOND • Font Family Description....................SysTypes.r......Editor
  93. FONT • Font Description...........................SysTypes.r......Editor
  94. FREF • File Reference.............................Types.r.........Editor
  95. FWID • Font Width Table...........................SysTypes.r......Editor
  96. ICON • Icon.......................................Types.r.........Editor
  97. ICN# • Icon List..................................Types.r.........Editor
  98. insc • Installer Script...........................SysTypes.r......Editor
  99. INTL0 • International Formatting Information......SysTypes.r......Editor
  100. itl0 • International Formatting Information.......SysTypes.r......Editor
  101. INTL1 • International Date/Time Information.......SysTypes.r......Editor
  102. itl1 • International Date/Time Information........SysTypes.r......Editor
  103. itl2 • Intl Str Comparision Package Hooks.........SysTypes.r......General
  104. itl4 • International Tokenize.....................SysTypes.r......General
  105. itlb • International Script Bundle................SysTypes.r......Editor
  106. itlc • International Configuration................SysTypes.r......Editor
  107. itlk • Intl exception dictionary for kchar........          ......Editor
  108. KCAP • Physical Layout of Keyboard................SysTypes.r......Editor
  109. KCHR • ASCII Mapping (software)...................SysTypes.r......Editor
  110. KMAP • Keyboard Mapping (hardware)................SysTypes.r......Editor
  111. KSWP • Keyboard Swapping..........................SysTypes.r......General
  112. MBAR • Menu Bar...................................Types.r.........Editor
  113. mcky • Mouse Tracking.............................SysTypes.r......General
  114. mctb • Menu Color Lookup Table....................Types.r.........Editor
  115. MENU • Menu.......................................Types.r.........Editor
  116. mppc • MPP Configuration Resource.................SysTypes.r......General
  117. mxbc • MacsBug 6.0 ...............................          ......General
  118. mxbi • MacsBug 6.0 init...........................          ......General
  119. mxbm • MacsBug 6.0 macros.........................          ......General
  120. mxwt • MacsBug 6.0 templates......................          ......General
  121. NFNT • Font Description...........................SysTypes.r......General
  122. nrct • Rectangle position list....................SysTypes.r......Editor
  123. PAT  • Quickdraw Pattern..........................Types.r.........Editor
  124. PAT# • Quickdraw Pattern List.....................Types.r.........Editor
  125. PICT • Quickdraw Picture..........................Types.r.........Editor
  126. pltt • Color Palette..............................Types.r.........Editor
  127. ppat • Pixel Pattern..............................Types.r.........Editor
  128. ROv# • ROM Resource Override......................SysTypes.r......Editor
  129. scrn • Screen Configuration.......................SysTypes.r......Editor
  130. SICN • Small Icon.................................Types.r.........Editor
  131. SIZE • MultiFinder Size Information...............Types.r.........Editor
  132. snd  • Sound......................................SysTypes.r......General
  133. STR  • PascalStyle String.........................Types.r.........Editor
  134. STR# • PascalStyle String List....................Types.r.........Editor
  135. wctb • Window Color Lookup Table..................Types.r.........Editor
  136. WIND • Window Template............................Types.r.........Editor
  137. æKY actb
  138. æC  /*----------------------------actb • Alert Color Lookup Table----------------------------*/
  139. type 'actb' {
  140.      unsigned hex longint;                                   /* ctSeed               */
  141.      integer;                                                /* ctFlags              */
  142.      integer = $$Countof(ColorSpec) - 1;                     /* ctSize               */
  143.      wide array ColorSpec {
  144.              integer     wContentColor,                      /* value                */
  145.                          wFrameColor,
  146.                          wTextColor,
  147.                          wHiliteColor,
  148.                          wTitleBarColor;
  149.              unsigned integer;                               /* RGB: red             */
  150.              unsigned integer;                               /*      green           */
  151.              unsigned integer;                               /*      blue            */
  152.      };
  153. };
  154. æKY acur
  155. æC  /*------------------------acur •              ----------------------------------*/
  156. type 'acur' {
  157.        integer = $$CountOf(CursIdArray); /* Nbr of cursors                 */
  158.        fill word;                        /* Next frame to show             */
  159.        array CursIdArray {
  160.            integer;                      /* 'CURS' resource id for a frame */
  161.            fill word;                    /* Pad word to make longint       */
  162.        };
  163. };
  164.  
  165. æKY ALRT
  166. æC  /*----------------------------ALRT • Alert Template-------------------------------------*/
  167. type 'ALRT' {
  168.      rect;                                                   /* boundsRect           */
  169.      integer;                                                /* 'DITL' ID            */
  170.  
  171.      /* NOTE: the stages are ordered 4, 3, 2, 1 */
  172.      wide array [4] {
  173.              boolean                 OK, Cancel;             /* Bold Outline         */
  174.              boolean                 invisible, visible;     /* Draw Alert           */
  175.              unsigned bitstring[2]   silent = 0
  176.                              sound1, sound2, sound3;         /* Beeps                */
  177.      };
  178. };
  179. æKY BNDL
  180. æC  /*----------------------------BNDL • Bundle---------------------------------------------*/
  181. type 'BNDL' {
  182.      literal longint;                                        /* Signature            */
  183.      integer;                                                /* Version ID           */
  184.      integer = $$CountOf(TypeArray) - 1;
  185.      array TypeArray {
  186.              literal longint;                                /* Type                 */
  187.              integer = $$CountOf(IDArray) - 1;
  188.              wide array IDArray {
  189.                      integer;                                /* Local ID             */
  190.                      integer;                                /* Actual ID            */
  191.              };
  192.      };
  193. };
  194. æKY cctb
  195. æC  /*----------------------------cctb • Control Color Lookup Table-------------------------*/
  196. type 'cctb' {
  197.      unsigned hex longint;                                   /* CCSeed               */
  198.      integer;                                                /* ccReserved           */
  199.      integer = $$Countof(ColorSpec) - 1;                     /* ctSize               */
  200.      wide array ColorSpec {
  201.              integer     cFrameColor,                        /* partcode             */
  202.                          cBodyColor,
  203.                          cTextColor,
  204.                          cElevatorColor;
  205.              unsigned integer;                               /* RGB: red             */
  206.              unsigned integer;                               /*      green           */
  207.              unsigned integer;                               /*      blue            */
  208.      };
  209. };
  210.  
  211. æKY cicn
  212. æC  /*----------------------------cicn • Color Icon-----------------------------------------*/
  213. #define  PIXMAPHEIGHT    ($$BitField(Bounds, 32, 16) /* bottom */    \
  214.                      - $$BitField(Bounds, 0, 16) /* top */)
  215.  
  216. type 'cicn' {
  217.      /* IconPMap (pixMap) record */
  218.      fill long;                                              /* Base address         */
  219.      unsigned bitstring[1] = 1;                              /* New pixMap flag      */
  220.      unsigned bitstring[2] = 0;                              /* Must be 0            */
  221. pMapRowBytes:
  222.      unsigned bitstring[13];                                 /* Offset to next row   */
  223. Bounds:
  224.      rect;                                                   /* Bitmap bounds        */
  225.      integer;                                                /* pixMap vers number   */
  226.      integer unpacked;                                       /* Packing format       */
  227.      unsigned longint;                                       /* Size of pixel data   */
  228.      unsigned hex longint;                                   /* h. resolution (ppi) (fixed) */
  229.      unsigned hex longint;                                   /* v. resolution (ppi) (fixed) */
  230.      integer         chunky, chunkyPlanar, planar;           /* Pixel storage format */
  231.      integer;                                                /* # bits in pixel      */
  232.      integer;                                                /* # components in pixel*/
  233.      integer;                                                /* # bits per field     */
  234.      unsigned longint;                                       /* Offset to next plane */
  235.      unsigned longint;                                       /* Offset to color table*/
  236.      fill long;                                              /* Reserved             */
  237.  
  238.      /* IconMask (bitMap) record */
  239.      fill long;                                              /* Base address         */
  240. maskRowBytes:
  241.      integer;                                                /* Row bytes            */
  242.      rect;                                                   /* Bitmap bounds        */
  243.      
  244.      /* IconBMap (bitMap) record */
  245.      fill long;                                              /* Base address         */
  246. iconBMapRowBytes:
  247.      integer;                                                /* Row bytes            */
  248.      rect;                                                   /* Bitmap bounds        */
  249.      
  250.      fill long;                                              /* Handle placeholder   */
  251.      
  252.      /* Mask data */
  253.      hex string [$$Word(maskRowBytes) * PIXMAPHEIGHT];       
  254.  
  255.      /* BitMap data */
  256.      hex string [$$Word(iconBMapRowBytes) * PIXMAPHEIGHT];       
  257.  
  258.      /* Color Table */
  259.      unsigned hex longint;                                   /* ctSeed               */
  260.      integer;                                                /* ctFlags              */
  261.      integer = $$Countof(ColorSpec) - 1;                     /* ctSize               */
  262.      wide array ColorSpec {
  263.              integer;                                        /* value                */
  264.              unsigned integer;                               /* RGB: red             */
  265.              unsigned integer;                               /*      green           */
  266.              unsigned integer;                               /*      blue            */
  267.      };
  268.  
  269.      /* PixelMap data */
  270.      hex string [$$BitField(pMapRowBytes, 0, 13) * PIXMAPHEIGHT];
  271. };
  272. _______________________________________________________________________________
  273.  
  274. »COLOR QUICKDRAW RESOURCE FORMATS
  275. _______________________________________________________________________________
  276.  
  277. Several new resource types have been defined for use with Color QuickDraw. They
  278. are
  279.  
  280.   'crsr'    Color cursor resource type
  281.   'ppat'    Pixel Pattern resource type
  282.   'cicn'    Color Icon resource type
  283.   'clut'    Color Look-Up Table resource type
  284.  
  285. The precise formats of resources of these types are given below.
  286.  
  287. It is important to note that resources are used somewhat differently by Color QuickDraw.
  288. For instance, with old QuickDraw, you could do a GetCursor for each SetCursor, and
  289. the same handle would be passed back to the application each time. With Color QuickDraw,
  290. the color cursor, icon, and pattern are compound structures, more complex than a
  291. simple resource handle. Color QuickDraw reads the requested resource, copies it, and
  292. then alters the copy before passing it to the application. Each time you call GetCCursor,
  293. you get a new copy of the cursor. This means that you should do one GetCCursor call
  294. for a cursor, even if you do multiple SetCCursor calls. These new resource types
  295. should be marked as purgeable if you are concerned about memory space.
  296.  
  297. Here are the resource formats of the resources used by Color QuickDraw.  All offsets
  298. are measured from the beginning of the resource’s data.
  299.  
  300. »'cicn' (Color Icon)
  301.  
  302.     IconPMap            {pixMap describing icon’s pixel image}
  303.         baseAddr        [4 bytes] = 0
  304.         rowBytes        [2 bytes] = rowBytes of image
  305.         bounds          [8 bytes] = boundary rectangle of image
  306.         pmVersion       [2 bytes] = 0
  307.         packType        [2 bytes] = 0
  308.         packSize        [4 bytes] = 0
  309.         hRes            [4 bytes] = $00480000
  310.         vRes            [4 bytes] = $00480000
  311.         pixelType       [2 bytes] = 0 = chunky
  312.         pixelSize       [2 bytes] = bits per pixel in image
  313.         cmpCount        [2 bytes] = 1
  314.         cmpSize         [2 bytes] = pixelsize
  315.         planeBytes      [4 bytes] = 0
  316.         pmTable         [4 bytes] = 0
  317.         pmReserved      [4 bytes] = 0
  318.     IconMask            {Mask used when drawing icon}
  319.         baseAddr        [4 bytes] = 0
  320.         rowBytes        [2 bytes] = rowBytes of image
  321.         bounds          [8 bytes] = boundary rectangle of image
  322.     IconBMap            {Image used when drawing to 1 bit screen}
  323.         baseAddr        [4 bytes] = 0
  324.         rowBytes        [2 bytes] = rowBytes of image
  325.         bounds          [8 bytes] = boundary rectangle of image
  326.     IconData            {placeholder for image’s handle}
  327.                         [4 bytes] = 0
  328.     MaskData            {the icon’s mask data }
  329.                         [n bytes] n = IconMask.rowBytes*height
  330.     BMapData            {the icon’s bitMap data }
  331.                         [n bytes] n = IconBMap.rowBytes*height
  332.     PMapCTab            {the icon’s color table }
  333.                         [n bytes] n = 8+(ColorTable.ctSize+1)*CTEntrySize
  334.     PMapData            {the icon’s image data }
  335.                         [n bytes] n = IconPMap.rowBytes*height
  336.  
  337. In the calculations above:
  338.  
  339.      height = IconPMap^^.bounds.bottom–IconPMap^^.bounds.top.
  340.  
  341. IconPMap is the pixMap describing the data in the IconData field. IconMask is the
  342. mask that is to be applied to the data when it is drawn. IconBMap is a bitMap to be
  343. drawn when the destination is only one or two pixels deep. If the rowbytes field of
  344. IconBMap is 0, then no data is loaded in for the IconBMap, and IconPMap is always
  345. used when drawing the icon. MaskData is the mask’s data. It is immediately followed
  346. by the bitMap’s data (which may be NIL). Next is the color table describing the
  347. IconPMap, as shown below. The final entry in the resource is the pixMap’s data.
  348.  
  349. æKY clut
  350. æC  /*----------------------------clut • Generic Color Lookup Table-------------------------*/
  351. type 'clut' {
  352.      unsigned hex longint;                                   /* ctSeed               */
  353.      integer;                                                /* ctFlags              */
  354.      integer = $$Countof(ColorSpec) - 1;                     /* ctSize               */
  355.      wide array ColorSpec {
  356.              integer;                                        /* value                */
  357.              unsigned integer;                               /* RGB: red             */
  358.              unsigned integer;                               /*      green           */
  359.              unsigned integer;                               /*      blue            */
  360.      };
  361. };
  362. _______________________________________________________________________________
  363.  
  364. »COLOR QUICKDRAW RESOURCE FORMATS
  365. _______________________________________________________________________________
  366.  
  367. Several new resource types have been defined for use with Color QuickDraw. They
  368. are
  369.  
  370.   'crsr'    Color cursor resource type
  371.   'ppat'    Pixel Pattern resource type
  372.   'cicn'    Color Icon resource type
  373.   'clut'    Color Look-Up Table resource type
  374.  
  375. The precise formats of resources of these types are given below.
  376.  
  377. It is important to note that resources are used somewhat differently by Color QuickDraw.
  378. For instance, with old QuickDraw, you could do a GetCursor for each SetCursor, and
  379. the same handle would be passed back to the application each time. With Color QuickDraw,
  380. the color cursor, icon, and pattern are compound structures, more complex than a
  381. simple resource handle. Color QuickDraw reads the requested resource, copies it, and
  382. then alters the copy before passing it to the application. Each time you call GetCCursor,
  383. you get a new copy of the cursor. This means that you should do one GetCCursor call
  384. for a cursor, even if you do multiple SetCCursor calls. These new resource types
  385. should be marked as purgeable if you are concerned about memory space.
  386.  
  387. Here are the resource formats of the resources used by Color QuickDraw.  All offsets
  388. are measured from the beginning of the resource’s data.
  389.  
  390. »'clut' (Color Table)
  391.  
  392.         ctSeed         [4 bytes] = 0
  393.         ctFlags        [2 bytes] = $0000 if pixMap color table
  394.                                  = $8000 if device color table
  395.         ctSize         [2 bytes] = #entries – 1
  396.         table data     [n bytes] n = 8*(ctSize+1)
  397.  
  398. The 'clut' resource format is an exact duplicate of a color table in memory.  Each
  399. element in the table data is four integers (eight bytes): a value field followed by
  400. red, green, and blue values.  If the color table is used to describe a pixMap, then
  401. ctFlags should be set to 0, and the value field of each entry contains the pixel
  402. value to be associated with the following RGB.  If the color table is used to describe
  403. a device, then ctFlags should be set to $8000, and the value fields should be set to
  404. 0.  In this case, the implicit values are based on each entry’s position in the
  405. table.
  406.  
  407. There are several default color tables that are in the Macintosh II ROMs.  There is
  408. one for each of the standard pixel depths.  The resource ID for each table is the
  409. same as the depth.  For example, the default color table used when you switch your
  410. system to 8 bits per pixel mode is stored with resource ID = 8.
  411.  
  412. There is one other default color table.  This color table defines the eight QuickDraw
  413. colors, the colors displayed by programs using the old QuickDraw model.  This color
  414. table has ID = 127.  Its values are given in the section
  415. “Setting the Foreground and Background Colors”.
  416.  
  417. æKY CNTL
  418. æC  /*----------------------------CNTL • Control Template-----------------------------------*/
  419. type 'CNTL' {
  420.      rect;                                                   /* Bounds               */
  421.      integer;                                                /* Value                */
  422.      byte            invisible, visible;                     /* visible              */
  423.      fill byte;
  424.      integer;                                                /* Max                  */
  425.      integer;                                                /* Min                  */
  426.      integer         pushButProc,                            /* ProcID               */
  427.                      checkBoxProc,
  428.                      radioButProc,
  429.                      pushButProcUseWFont = 8,
  430.                      checkBoxProcUseWFont,
  431.                      radioButProcUseWFont,
  432.                      scrollBarProc = 16;
  433.      longint;                                                /* RefCon               */
  434.      pstring;                                                /* Title                */
  435. };
  436. æKY crsr
  437. æC  /*----------------------------crsr • Color Cursor---------------------------------------*/
  438. type 'crsr' {
  439.      /* CCrsr record */
  440.      hex unsigned integer    oldCursor   = $8000,            /* Type of cursor       */
  441.                              colorCursor = $8001;
  442.      unsigned longint = pixMap / 8;                          /* Offset to pixMap     */
  443.      unsigned longint = pixelData / 8;                       /* Offset to pixel data */
  444.      fill long;                                              /* Expanded cursor data */
  445.      fill word;                                              /* Expanded data depth  */
  446.      fill long;                                              /* Reserved             */
  447.      hex string [32];                                        /* One bit cursor data  */
  448.      hex string [32];                                        /* One bit cursor mask  */
  449.      point;                                                  /* Hot spot             */
  450.      fill long;                                              /* Table id             */
  451.      fill long;                                              /* id for cursor        */
  452.  
  453.      /* IconPMap (pixMap) record */
  454. pixMap:
  455.      fill long;                                              /* Base address         */
  456.      unsigned bitstring[1] = 1;                              /* New pixMap flag      */
  457.      unsigned bitstring[2] = 0;                              /* Must be 0            */
  458.      unsigned bitstring[13];                                 /* Offset to next row   */
  459.      rect;                                                   /* Bitmap bounds        */
  460.      integer;                                                /* pixMap version number*/
  461.      integer unpacked;                                       /* Packing format       */
  462.      unsigned longint;                                       /* Size of pixel data   */
  463.      unsigned hex longint;                                   /* h. resolution (ppi) (fixed) */
  464.      unsigned hex longint;                                   /* v. resolution (ppi) (fixed) */
  465.      integer         chunky, chunkyPlanar, planar;           /* Pixel storage format */
  466.      integer;                                                /* # bits in pixel      */
  467.      integer;                                                /* # components in pixel*/
  468.      integer;                                                /* # bits per field     */
  469.      unsigned longint;                                       /* Offset to next plane */
  470.      unsigned longint = colorTable / 8;                      /* Offset to color table*/
  471.      fill long;                                              /* Reserved             */
  472.  
  473. pixelData:
  474.      hex string [(colorTable - pixelData) / 8];              /* Pixel data           */
  475.  
  476.      /* Color Table */
  477. colorTable:
  478.      unsigned hex longint;                                   /* ctSeed               */
  479.      integer;                                                /* ctFlags              */
  480.      integer = $$Countof(ColorSpec) - 1;                     /* ctSize               */
  481.      wide array ColorSpec {
  482.              integer;                                        /* value                */
  483.              unsigned integer;                               /* RGB: red             */
  484.              unsigned integer;                               /*      green           */
  485.              unsigned integer;                               /*      blue            */
  486.      };
  487. };
  488. _______________________________________________________________________________
  489.  
  490. »COLOR QUICKDRAW RESOURCE FORMATS
  491. _______________________________________________________________________________
  492.  
  493. Several new resource types have been defined for use with Color QuickDraw. They
  494. are
  495.  
  496.   'crsr'    Color cursor resource type
  497.   'ppat'    Pixel Pattern resource type
  498.   'cicn'    Color Icon resource type
  499.   'clut'    Color Look-Up Table resource type
  500.  
  501. The precise formats of resources of these types are given below.
  502.  
  503. It is important to note that resources are used somewhat differently by Color QuickDraw.
  504. For instance, with old QuickDraw, you could do a GetCursor for each SetCursor, and
  505. the same handle would be passed back to the application each time. With Color QuickDraw,
  506. the color cursor, icon, and pattern are compound structures, more complex than a
  507. simple resource handle. Color QuickDraw reads the requested resource, copies it, and
  508. then alters the copy before passing it to the application. Each time you call GetCCursor,
  509. you get a new copy of the cursor. This means that you should do one GetCCursor call
  510. for a cursor, even if you do multiple SetCCursor calls. These new resource types
  511. should be marked as purgeable if you are concerned about memory space.
  512.  
  513. Here are the resource formats of the resources used by Color QuickDraw.  All offsets
  514. are measured from the beginning of the resource’s data.
  515.  
  516. »'crsr' (Color Cursor)
  517.  
  518.     CCrsr               {data structure describing cursor}
  519.         crsrType:       [2 bytes] = $8001
  520.         crsrMap:        [4 bytes] = offset to pixMap structure
  521.         crsrData:       [4 bytes] = offset to pixel data
  522.         crsrXData:      [4 bytes] = 0
  523.         crsrXValid:     [2 bytes] = 0
  524.         crsrXHandle:    [4 bytes] = 0
  525.         crsr1Data:      [32 bytes] = 1 bit image for cursor
  526.         crsrMask:       [32 bytes] = cursor’s mask
  527.         crsrHotSpot:    [4 bytes] = cursor’s hotSpot (v,h)
  528.         crsrXTable:     [4 bytes] = 0
  529.         crsrID:         [4 bytes] = 0
  530.     PixMap              {pixMap describing cursor’s pixel image}
  531.         baseAddr:       [4 bytes] = 0
  532.         rowBytes:       [2 bytes] = rowBytes of image
  533.         bounds:         [8 bytes] = boundary rectangle of image
  534.         pmVersion:      [2 bytes] = 0
  535.         packType:       [2 bytes] = 0
  536.         packSize:       [4 bytes] = 0
  537.         hRes:           [4 bytes] = $00480000
  538.         vRes:           [4 bytes] = $00480000
  539.         pixelType:      [2 bytes] = 0 = chunky
  540.         pixelSize:      [2 bytes] = bits per pixel in image
  541.         cmpCount:       [2 bytes] = 1
  542.         cmpSize:        [2 bytes] = pixelsize
  543.         planeBytes:     [4 bytes] = 0
  544.         pmTable:        [4 bytes] = offset to color table data
  545.         pmReserved:     [4 bytes] = 0
  546.     pixel data          [see below]        data for cursor
  547.     color table data    [see below]        data for color table
  548.  
  549. The crsrMap field of the CCrsr record contains an offset to the pixMap record from
  550. the beginning of the resource data. The crsrData field of the CCrsr record contains
  551. an offset to the pixel data from the beginning of the resource data. The pmTable
  552. field of the pixMap record contains an offset to the color table data from the beginning
  553. of the resource data. The size of the pixelData is calculated by subtracting the
  554. offset to the pixel data from the offset to the color table data.  The color table
  555. data consists of a color table record
  556. (ctSeed, ctFlags, ctSize) followed by ctSize+1 color table entries. Each entry in the
  557. color table connects a pixel value used in the pixel data to an actual RGB.
  558.  
  559. æKY CURS
  560. æC  /*----------------------------CURS • Cursor---------------------------------------------*/
  561. type 'CURS' {
  562.      hex string [32];                                        /* Data                 */
  563.      hex string [32];                                        /* Mask                 */
  564.      point;                                                  /* Hot spot             */
  565. };
  566. æKY dctb
  567. æC  /*----------------------------dctb • Dialog Color Lookup Table--------------------------*/
  568. type 'dctb' as 'actb';
  569. æKY DITL
  570. æC  /*----------------------------DITL • Dialog Item List-----------------------------------*/
  571. type 'DITL' {
  572.      integer = $$CountOf(DITLarray) - 1;                     /* Array size           */
  573.      wide array DITLarray {
  574.              fill long;
  575.              rect;                                           /* Item bounds          */
  576.              switch {
  577.              case Button:
  578.                      boolean         enabled,disabled;       /* Enable flag          */
  579.                      key bitstring[7] = 4;
  580.                      pstring;                                /* Title                */
  581.  
  582.              case CheckBox:
  583.                      boolean         enabled,disabled;       /* Enable flag          */
  584.                      key bitstring[7] = 5;
  585.                      pstring;                                /* Title                */
  586.  
  587.              case RadioButton:
  588.                      boolean         enabled,disabled;       /* Enable flag          */
  589.                      key bitstring[7] = 6;
  590.                      pstring;                                /* Title                */
  591.  
  592.              case Control:
  593.                      boolean         enabled,disabled;       /* Enable flag          */
  594.                      key bitstring[7] = 7;
  595.                      byte = 2;
  596.                      integer;                                /* 'CTRL' ID            */
  597.  
  598.              case StaticText:
  599.                      boolean         enabled,disabled;       /* Enable flag          */
  600.                      key bitstring[7] = 8;
  601.                      pstring;                                /* Text                 */
  602.  
  603.              case EditText:
  604.                      boolean         enabled,disabled;       /* Enable flag          */
  605.                      key bitstring[7] = 16;
  606.                      pstring;                                /* Text                 */
  607.  
  608.              case Icon:
  609.                      boolean         enabled,disabled;       /* Enable flag          */
  610.                      key bitstring[7] = 32;
  611.                      byte = 2;
  612.                      integer;                                /* 'ICON' ID            */
  613.  
  614.              case Picture:
  615.                      boolean         enabled,disabled;       /* Enable flag          */
  616.                      key bitstring[7] = 64;
  617.                      byte = 2;
  618.                      integer;                                /* 'PICT' ID            */
  619.  
  620.              case UserItem:
  621.                      boolean         enabled,disabled;       /* Enable flag          */
  622.                      key bitstring[7] = 0;
  623.                      byte = 0;
  624.              };
  625.              align word;
  626.      };
  627. };
  628. æKY DLOG
  629. æC  /*----------------------------DLOG • Dialog Template------------------------------------*/
  630. type 'DLOG' {
  631.      rect;                                                   /* boundsRect           */
  632.      integer         documentProc,                           /* procID               */
  633.                      dBoxProc,
  634.                      plainDBox,
  635.                      altDBoxProc,
  636.                      noGrowDocProc,
  637.                      zoomDocProc = 8,
  638.                      zoomNoGrow = 12,
  639.                      rDocProc = 16;
  640.      byte            invisible, visible;                     /* visible              */
  641.      fill byte;
  642.      byte            noGoAway, goAway;                       /* goAway               */
  643.      fill byte;
  644.      unsigned hex longint;                                   /* refCon               */
  645.      integer;                                                /* 'DITL' ID            */
  646.      pstring;                                                /* title                */
  647. };
  648. æKY fctb
  649. æC  /*----------------------------fctb • Font Color Lookup Table----------------------------*/
  650. type 'fctb' as 'clut';
  651.  
  652. »Font Color Tables
  653.  
  654. Note:  The extensions to the Font Manager described in the following paragraphs
  655.        were originally documented in Inside Macintosh, Volume V.  As such,
  656.        this information refers to the Macintosh SE and Macintosh II ROMs and
  657.        System file version 4.1 and later.
  658.  
  659. With resources of type 'NFNT', you can specify absolute colors for the font by also
  660. supplying a color table.  Stored as a resource of type 'fctb' with the same ID as the
  661. associated 'NFNT' resource, this table is simply the ColorTable record described in
  662. the Color Manager chapter.
  663.  
  664. A 4-bit font depth provides index values for a color table containing 16 entries.  If
  665. there are index values for which no corresponding entries are found in the associated
  666. color table, the Font Manager assigns colors based on the current port’s foreground
  667. and background colors.  If only one entry is missing, it’s assigned the background
  668. color.  If two entries are missing, the higher index value is assigned the foreground
  669. color and the lower value is given the background color.  If more than two values are
  670. missing, the entries are given shades ranging between the foreground and background
  671. colors.  Figure 19 shows a hypothetical color table for a 2-bit font in which only
  672. five entries have been supplied in the 'fctb' resource.
  673.  
  674. •••Refer to Figure 19.•••
  675.  
  676. Figure 19–Hypothetical Font Color Table Entries
  677.  
  678. If no color table is provided, the highest and lowest possible index values for any
  679. given screen depth (with a 2-bit screen depth, for example, values 7 and 0) are
  680. assigned the foreground and background colors respectively, with the remaining entries
  681. given shades in between.  This allows gray-scale fonts to be created with as many
  682. levels of gray as are needed (since each gray is just a color in between a foreground
  683. of black and a background of white) without needing a color table.
  684.  
  685. æKY FREF
  686. æC  /*----------------------------FREF • File Reference-------------------------------------*/
  687. type 'FREF' {
  688.      literal longint;                                        /* File Type            */
  689.      integer;                                                /* Icon ID              */
  690.      pstring;                                                /* Filename             */
  691. };
  692. æKY ICON
  693. æC  /*----------------------------ICON • Icon-----------------------------------------------*/
  694. type 'ICON' {
  695.      hex string[128];                                        /* Icon data            */
  696. };
  697. æKY ICN#
  698. æC  /*----------------------------ICN# • Icon List------------------------------------------*/
  699. type 'ICN#' {
  700.      array {
  701.              hex string[128];                                /* Icon data            */
  702.      };
  703. };
  704. æKY MENU
  705. æC  /*----------------------------MENU • Menu-----------------------------------------------*/
  706. type 'MENU' {
  707.      integer;                                                /* Menu ID              */
  708.      fill word[2];
  709.      integer         textMenuProc = 0;                       /* ID of menu def proc  */
  710.      fill word;
  711.      unsigned hex bitstring[31]
  712.                      allEnabled = 0x7FFFFFFF;                /* Enable flags         */
  713.      boolean         disabled, enabled;                      /* Menu enable          */
  714.      pstring         apple = "\0x14";                        /* Menu Title           */
  715.      wide array {
  716.              pstring;                                        /* Item title           */
  717.              byte            noIcon;                         /* Icon number          */
  718.              char            noKey = "\0x00",                /* Key equivalent or    */
  719.                              hierarchicalMenu = "\0x1B";     /* hierarchical menu    */
  720.              char            noMark = "\0x00",               /* Marking char or id   */
  721.                              check = "\0x12";                /* of hierarchical menu */
  722.              fill bit;
  723.              unsigned bitstring[7]
  724.                              plain;                          /* Style                */
  725.      };
  726.      byte = 0;
  727. };
  728. æKY MBAR
  729. æC  /*----------------------------MBAR • Menu Bar-------------------------------------------*/
  730. type 'MBAR' {
  731.      integer = $$CountOf(MenuArray);                         /* Number of menus      */
  732.      wide array MenuArray{
  733.              integer;                                        /* Menu resource ID     */
  734.      };
  735. };
  736. æKY mctb
  737. æC  /*----------------------------mctb • Menu Color Lookup Table----------------------------*/
  738. type 'mctb' {
  739.      integer = $$CountOf(MCTBArray);                         /* Color table count    */
  740.      wide array MCTBArray {
  741.          integer             mctbLast = -99;                 /* Menu resource ID     */
  742.          integer;                                            /* Menu Item            */
  743.          wide array [4] {
  744.                  unsigned integer;                           /* RGB: red             */
  745.                  unsigned integer;                           /*      green           */
  746.                  unsigned integer;                           /*      blue            */
  747.          };
  748.          fill word;                                          /* Reserved word        */
  749.      };
  750. };
  751. æKY PAT 
  752. æC  /*----------------------------PAT  • Quickdraw Pattern----------------------------------*/
  753. type 'PAT ' {
  754.      hex string[8];                                          /* Pattern              */
  755. };
  756. æKY PAT#
  757. æC  /*----------------------------PAT# • Quickdraw Pattern List-----------------------------*/
  758. type 'PAT#' {
  759.      integer = $$Countof(PatArray);
  760.      array PatArray {
  761.              hex string[8];                                  /* Pattern              */
  762.      };
  763. };
  764. æKY pltt
  765. æC  /*----------------------------pltt • Color Palette--------------------------------------*/
  766. type 'pltt' {
  767.      integer = $$CountOf(ColorInfo);                         /* Color table count    */      
  768.      fill long;                                              /* Reserved             */
  769.      fill word;                                              /* Reserved             */
  770.      fill long;                                              /* Reserved             */
  771.      fill long;                                              /* Reserved             */
  772.      wide array ColorInfo {
  773.          unsigned integer;                                   /* RGB: red             */
  774.          unsigned integer;                                   /*      green           */
  775.          unsigned integer;                                   /*      blue            */
  776.          integer     pmCourteous, pmDithered, pmTolerant,    /* Color usage          */
  777.                      pmAnimated = 4, pmExplicit = 8;
  778.          integer;                                            /* Tolerance value      */
  779.          fill word;                                          /* Private flags        */
  780.          fill long;                                          /* Private              */
  781.      };
  782. };
  783.  
  784. æKY ppat
  785. æC  /*----------------------------ppat • Pixel Pattern--------------------------------------*/
  786. type 'ppat' {
  787.      /* PixPat record */
  788.      integer     oldPattern,                                 /* Pattern type         */
  789.                  newPattern,
  790.                  ditherPattern;
  791.      unsigned longint = PixMap / 8;                          /* Offset to pixmap     */
  792.      unsigned longint = PixelData / 8;                       /* Offset to data       */
  793.      fill long;                                              /* Expanded pixel image */
  794.      fill word;                                              /* Pattern valid flag   */
  795.      fill long;                                              /* expanded pattern     */
  796.      hex string [8];                                         /* old-style pattern    */
  797.  
  798.      /* PixMap record */
  799. PixMap:
  800.      fill long;                                              /* Base address         */
  801.      unsigned bitstring[1] = 1;                              /* New pixMap flag      */
  802.      unsigned bitstring[2] = 0;                              /* Must be 0            */
  803.      unsigned bitstring[13];                                 /* Offset to next row   */
  804.      rect;                                                   /* Bitmap bounds        */
  805.      integer;                                                /* pixMap vers number   */
  806.      integer     unpacked;                                   /* Packing format       */
  807.      unsigned longint;                                       /* size of pixel data   */
  808.      unsigned hex longint;                                   /* h. resolution (ppi) (fixed) */
  809.      unsigned hex longint;                                   /* v. resolution (ppi) (fixed) */
  810.      integer         chunky, chunkyPlanar, planar;           /* Pixel storage format */
  811.      integer;                                                /* # bits in pixel      */
  812.      integer;                                                /* # components in pixel*/
  813.      integer;                                                /* # bits per field     */
  814.      unsigned longint;                                       /* Offset to next plane */
  815.      unsigned longint = ColorTable / 8;                      /* Offset to color table*/
  816.      fill long;                                              /* Reserved             */
  817.  
  818. PixelData:
  819.      hex string [(ColorTable - PixelData) / 8];
  820.  
  821. ColorTable:
  822.      unsigned hex longint;                                   /* ctSeed               */
  823.      integer;                                                /* ctFlags              */
  824.      integer = $$Countof(ColorSpec) - 1;                     /* ctSize               */
  825.      wide array ColorSpec {
  826.              integer;                                        /* value                */
  827.              unsigned integer;                               /* RGB: red             */
  828.              unsigned integer;                               /*      green           */
  829.              unsigned integer;                               /*      blue            */
  830.      };
  831. };
  832.  
  833. _______________________________________________________________________________
  834.  
  835. »COLOR QUICKDRAW RESOURCE FORMATS
  836. _______________________________________________________________________________
  837.  
  838. Several new resource types have been defined for use with Color QuickDraw. They
  839. are
  840.  
  841.   'crsr'    Color cursor resource type
  842.   'ppat'    Pixel Pattern resource type
  843.   'cicn'    Color Icon resource type
  844.   'clut'    Color Look-Up Table resource type
  845.  
  846. The precise formats of resources of these types are given below.
  847.  
  848. It is important to note that resources are used somewhat differently by Color QuickDraw.
  849. For instance, with old QuickDraw, you could do a GetCursor for each SetCursor, and
  850. the same handle would be passed back to the application each time. With Color QuickDraw,
  851. the color cursor, icon, and pattern are compound structures, more complex than a
  852. simple resource handle. Color QuickDraw reads the requested resource, copies it, and
  853. then alters the copy before passing it to the application. Each time you call GetCCursor,
  854. you get a new copy of the cursor. This means that you should do one GetCCursor call
  855. for a cursor, even if you do multiple SetCCursor calls. These new resource types
  856. should be marked as purgeable if you are concerned about memory space.
  857.  
  858. Here are the resource formats of the resources used by Color QuickDraw.  All offsets
  859. are measured from the beginning of the resource’s data.
  860.  
  861. »'ppat' (Pixel Pattern)
  862.  
  863.     PixPat record      {data structure describing pattern}
  864.         patType        [2 bytes] = 1 (full color pattern)
  865.         patMap         [4 bytes] = offset to pixMap record
  866.         patData        [4 bytes] = offset to pixel data
  867.         patXData       [4 bytes] = 0
  868.         patXValid      [2 bytes] = –1
  869.         patXMap        [4 bytes] = 0
  870.         pat1Data       [8 bytes] = 1 bit pattern data
  871.     PixMap             { pixMap describing pattern’s pixel image }
  872.         baseAddr       [4 bytes] = 0
  873.         rowBytes       [2 bytes] = rowBytes of image
  874.         bounds         [8 bytes] = boundary rectangle of image
  875.         pmVersion      [2 bytes] = 0
  876.         packType       [2 bytes] = 0
  877.         packSize       [4 bytes] = 0
  878.         hRes           [4 bytes] = $00480000
  879.         vRes           [4 bytes] = $00480000
  880.         pixelType      [2 bytes] = 0 = chunky
  881.         pixelSize      [2 bytes] = bits per pixel in image
  882.         cmpCount       [2 bytes] = 1
  883.         cmpSize        [2 bytes] = pixelsize
  884.         planeBytes     [4 bytes] = 0
  885.         pmTable        [4 bytes] = offset to color table data
  886.         pmReserved     [4 bytes] = 0
  887.     pixel data         [see below]        data for pattern
  888.     color table data   [see below]        data for color table
  889.  
  890. The patMap field of the pixPat record contains an offset to the pixMap record from
  891. the beginning of the resource data. The patData field of the pixPat record contains
  892. an offset to the pixel data from the beginning of the resource data. The pmTable
  893. field of the pixMap record contains an offset to the color table data from the beginning
  894. of the resource data. The size of the pixelData is calculated by subtracting the
  895. offset to the pixel data from the offset to the color table data.  The color table
  896. data consists of a color table record
  897. (ctSeed, ctFlags, ctSize) followed by ctSize+1 color table entries. Each entry in the
  898. color table connects a pixel value used in the pixel data to an actual RGB.
  899.  
  900. æKY SICN
  901. æC  /*----------------------------SICN • Small Icon-----------------------------------------*/
  902. type 'SICN' {
  903.      array {
  904.              hex string[32];                                 /* SICN data            */
  905.      };
  906. };
  907. æKY SIZE
  908. æC  /*----------------------------SIZE • MultiFinder Size Information-----------------------*/
  909. type 'SIZE' {
  910.      boolean                 dontSaveScreen,                 /* for SWITCHER         */
  911.                              saveScreen;                     /*    compatibility     */
  912.      boolean                 ignoreSuspendResumeEvents,      /* suspend-resume       */
  913.                              acceptSuspendResumeEvents;
  914.      boolean                 enableOptionSwitch,             /* for SWITCHER         */
  915.                              disableOptionSwitch;            /*    compatibility     */
  916.      boolean                 cannotBackground,
  917.                              canBackground;                  /* Can properly use back-
  918.                                                                 ground null events   */
  919.      boolean                 notMultiFinderAware,            /* activate/deactivate  */
  920.                              multiFinderAware;               /* on resume/suspend    */
  921.      boolean                 backgroundAndForeground,        /* Application does not */
  922.                              onlyBackground;                 /* have a user interface*/
  923.      boolean                 dontGetFrontClicks,             /* Get mouse down/up    */
  924.                              getFrontClicks;                 /* when suspended       */
  925.      boolean                 ignoreChildDiedEvents,          /* Apps use this.       */
  926.                              acceptChildDiedEvents;          /* Debuggers use this.  */
  927.      boolean                 not32BitCompatible,             /* Works with 24bit addr*/
  928.                              is32BitCompatible;              /* Works with 24 or 32  */
  929.                                                              /* bit addresses        */
  930. #undef reserved
  931.      boolean                 reserved;                       /* These seven bits are */      
  932.      boolean                 reserved;                       /* reserved.  Set them  */
  933.      boolean                 reserved;                       /* to "reserved". When  */
  934.      boolean                 reserved;                       /* we decide to define  */
  935.      boolean                 reserved;                       /* a new flag, your     */
  936.      boolean                 reserved;                       /* old resource will    */
  937.      boolean                 reserved;                       /* still compile.       */
  938.      
  939.      /* Memory sizes are in bytes */
  940.      unsigned longint;                                       /* preferred mem size   */
  941.      unsigned longint;                                       /* minimum mem size     */
  942.  
  943.      // If we ever define one of the seven reserved bits above, the "reserved"
  944.      // enumeration wouldn't appear on the newly defined bit.  By defining "reserved"
  945.      // below, old resource SIZE declarations will still compile.
  946. #define  reserved        false
  947. };
  948. æKY STR 
  949. æC  /*----------------------------STR  • Pascal-Style String--------------------------------*/
  950. type 'STR ' {
  951.      pstring;                                                /* String               */
  952. };
  953. æKY STR#
  954. æC  /*----------------------------STR# • Pascal-Style String List---------------------------*/
  955. type 'STR#' {
  956.      integer = $$Countof(StringArray);
  957.      array StringArray {
  958.              pstring;                                        /* String               */
  959.      };
  960. };
  961. æKY wctb
  962. æC  /*----------------------------wctb • Window Color Lookup Table--------------------------*/
  963. type 'wctb' as 'actb';
  964. æKY WIND
  965. æC  /*----------------------------WIND • Window Template------------------------------------*/
  966. type 'WIND' {
  967.      rect;                                                   /* boundsRect           */
  968.      integer         documentProc,                           /* procID               */
  969.                      dBoxProc,
  970.                      plainDBox,
  971.                      altDBoxProc,
  972.                      noGrowDocProc,
  973.                      zoomDocProc = 8,
  974.                      zoomNoGrow = 12,
  975.                      rDocProc = 16;
  976.      byte            invisible, visible;                     /* visible              */
  977.      fill byte;
  978.      byte            noGoAway, goAway;                       /* goAway               */
  979.      fill byte;
  980.      unsigned hex longint;                                   /* refCon               */
  981.      pstring         Untitled = "Untitled";                  /* title                */
  982. };
  983. æKY DRVR
  984. æC  /*----------------------------DRVR • Driver---------------------------------------------*/
  985. type 'DRVR' {
  986.      boolean = 0;
  987.      boolean         dontNeedLock, needLock;                 /* lock drvr in memory  */
  988.      boolean         dontNeedTime, needTime;                 /* for periodic action  */
  989.      boolean         dontNeedGoodbye, needGoodbye;           /* call before heap reinit*/
  990.      boolean         noStatusEnable, statusEnable;           /* responds to status   */
  991.      boolean         noCtlEnable, ctlEnable;                 /* responds to control  */
  992.      boolean         noWriteEnable, writeEnable;             /* responds to write    */
  993.      boolean         noReadEnable, readEnable;               /* responds to read     */
  994.      byte = 0;
  995.      integer;                                                /* driver delay         */
  996.      unsigned hex integer;                                   /* desk acc event mask  */
  997.      integer;                                                /* driver menu          */
  998.      unsigned hex integer;                                   /* offset to open       */
  999.      unsigned hex integer;                                   /* offset to prime      */
  1000.      unsigned hex integer;                                   /* offset to control    */
  1001.      unsigned hex integer;                                   /* offset to status     */
  1002.      unsigned hex integer;                                   /* offset to close      */
  1003.      pstring;                                                /* driver name          */
  1004.      hex string;                                             /* driver code          */
  1005. };
  1006. æKY finf
  1007. æC  /*----------------------------finf • Font Family Description----------------------------*/
  1008. type 'finf' {
  1009.      integer = $$CountOf(Fonts);                             /* # of fonts           */
  1010.      array Fonts {
  1011.          integer;                                            /* Font Number          */
  1012.          unsigned hex integer    plain;                      /*      Font Style      */
  1013.          integer;                                            /*      Font Size       */
  1014.      };
  1015. };
  1016.  
  1017. æKY FOND
  1018. æC  /*----------------------------FOND • Font Family Description----------------------------*/
  1019. /* Note: this FOND resource definition only works when the tables at the end of the
  1020.       resource are in this order:    1 - Family Character-Width Table
  1021.                                      2 - Style Mapping Table
  1022.                                      3 - Kerning Tables
  1023. */
  1024. type 'FOND' {
  1025.      /* Flags Word */
  1026.      boolean     proportionalFont, fixedWidthFont;
  1027.      boolean     useFractWidthTable, dontUseFractWidthTable;
  1028.      boolean     computeFixedPointExtra, useIntegerExtra;
  1029.      boolean     useFractEnable, ignoreFractEnable;
  1030.      boolean     canAdjustCharSpacing, dontAdjustCharSpacing;
  1031.      unsigned hex bitstring[9] = 0;                          /* Reserved             */
  1032.      boolean     noCharWidthTable, hasCharWidthTable;
  1033.      boolean     noImageHeightTable, hasImageHeightTable;
  1034.  
  1035.      integer;                                                /* Family ID number     */
  1036.  First:
  1037.      integer;                                                /* first char           */
  1038.  Last:
  1039.      integer;                                                /* last char            */
  1040.      integer;                                                /* Ascent               */
  1041.      integer;                                                /* Descent              */
  1042.      integer;                                                /* Leading              */
  1043.      integer;                                                /* Width Max            */
  1044.  WidthOffset:
  1045.      unsigned hex longint = WidthTable[1] >> 3;              /* Width table offset   */
  1046.  KerningOffset:
  1047.      unsigned hex longint = KerningTable[1] >> 3;            /* Kerning table offset */
  1048.  StyleMapOffset:
  1049.      unsigned hex longint = StyleTable[1] >> 3;              /* Style map offset     */
  1050.      integer;                                                /* reserved             */
  1051.      integer;                                                /* ex wid bold          */
  1052.      integer;                                                /* ex wid italic        */
  1053.      integer;                                                /* ex wid underline     */
  1054.      integer;                                                /* ex wid outline       */
  1055.      integer;                                                /* ex wid shadow        */
  1056.      integer;                                                /* ex wid condensed     */
  1057.      integer;                                                /* ex wid extended      */
  1058.      integer;                                                /* reserved             */
  1059.      longint;                                                /* reserved for intl    */
  1060.  Version:
  1061.      integer;                                                /* version              */
  1062.  
  1063.      /* Font Association Table */
  1064.      integer = $$CountOf(FontEntries)-1;                     /* # of font entries    */
  1065.      wide array FontEntries {
  1066.          integer;                                            /* Font size            */
  1067.          integer;                                            /* Font style           */
  1068.          integer;                                            /* Resource ID of FONT  */
  1069.      };
  1070.      /*  */
  1071.      array [$$Word(Version) == 2] {
  1072.  OffsetTableStart:
  1073.          integer = $$CountOf(OffsetTable) - 1;
  1074.          array OffsetTable {
  1075.              longint = (BBoxStart[1] - OffsetTableStart[1]) >> 3;                
  1076.          };
  1077.          /* Font Bounding Box Table */
  1078.  BBoxStart:
  1079.          integer = $$CountOf(BBoxTable) - 1;
  1080.          wide array BBoxTable {
  1081.              fill bit[9];                                    /* Reserved             */
  1082.              Boolean     noExtendedStyle, EXTENDEDstyle;     /* Extended style       */
  1083.              Boolean     noCondensedStyle, CONDENSEDstyle;   /* Condensed style      */
  1084.              Boolean     noShadowStyle, SHADOWstyle;         /* Shadow style         */
  1085.              Boolean     noOutlineStyle, OUTLINEstyle;       /* Outline style        */
  1086.              Boolean     noUnderline, UNDERLINEstyle;        /* Underline style      */
  1087.              Boolean     noItalicStyle, ITALICstyle;         /* Italic style         */
  1088.              Boolean     noBoldStyle, BOLDstyle;             /* Bold style           */
  1089.              Rect;
  1090.          };
  1091.      };
  1092.  
  1093.      /* Family Character-Width Table */
  1094.      /* This outer array below handles the case when the width table offset (WidthOffset:)
  1095.         is zero. */
  1096.      array [$$Long(WidthOffset) != 0] {
  1097.  WidthTable:
  1098.          integer = $$CountOf(WidthTable) - 1;                /* # of width tables    */
  1099.          wide array WidthTable {
  1100.              fill bit[9];                                    /* Reserved             */
  1101.              Boolean     noExtendedStyle, EXTENDEDstyle;     /* Extended style       */
  1102.              Boolean     noCondensedStyle, CONDENSEDstyle;   /* Condensed style      */
  1103.              Boolean     noShadowStyle, SHADOWstyle;         /* Shadow style         */
  1104.              Boolean     noOutlineStyle, OUTLINEstyle;       /* Outline style        */
  1105.              Boolean     noUnderline, UNDERLINEstyle;        /* Underline style      */
  1106.              Boolean     noItalicStyle, ITALICstyle;         /* Italic style         */
  1107.              Boolean     noBoldStyle, BOLDstyle;             /* Bold style           */
  1108.              
  1109.              wide array [$$Word(Last) - $$Word(First) + 3] {
  1110.                  unsigned hex integer;                       /* Width of character   */
  1111.              };
  1112.          };
  1113.      };
  1114.  
  1115.      /* Style Mapping Table */
  1116.      /* This outer array below handles the case when the width table offset (WidthOffset:)
  1117.         is zero. */
  1118.      array [$$Long(StyleMapOffset) != 0] {
  1119.  StyleTable:
  1120.          unsigned hex integer;                               /* Font class           */
  1121.  CharCodeOffset:
  1122.          unsigned hex longint =                              /* Encoding table offset*/
  1123.              (CharCodeTable[1,1] - StyleTable[1]) / 8 * (CharCodeTable[1,1] != 0);
  1124.          fill long;                                          /* Reserved             */
  1125.          array [48] {
  1126.              byte;
  1127.          };
  1128.          /* Style Name Table */
  1129.          integer = $$CountOf(StyleNames);                    /* Number of strings    */
  1130.          pstring;                                            /* Full base font name  */
  1131.          array StyleNames {
  1132.              pstring;                                        /* Style suffix names   */
  1133.          };
  1134.          
  1135.          /* Character Set Encoding Table */
  1136.          /* This outer array below handles the case when the character set encoding
  1137.             offset is zero (CharCodeOffset:) */
  1138.          array [$$Long(CharCodeOffset[1]) != 0] {
  1139.  CharCodeTable:
  1140.              integer = $$CountOf(CharacterCodes);            /* Number of entries    */
  1141.              wide array CharacterCodes {
  1142.                  char;                                       /* Character code       */
  1143.                  pstring;                                    /* Char name string     */
  1144.              };
  1145.          };
  1146.      };
  1147.  
  1148.      /* Kerning Tables */
  1149.      /* This outer array below handles the case when the kerning table offset
  1150.         (KerningOffset:) is zero. */
  1151.      array [$$Long(KerningOffset) != 0] {
  1152.          /* Kerning Tables */
  1153.  KerningTable:
  1154.          integer = $$CountOf(KerningTables) - 1;             /* Number of tables     */
  1155.          wide array KerningTables {
  1156.              fill bit[9];                                    /* Reserved             */
  1157.              Boolean     noExtendedStyle, EXTENDEDstyle;     /* Extended style       */
  1158.              Boolean     noCondensedStyle, CONDENSEDstyle;   /* Condensed style      */
  1159.              Boolean     noShadowStyle, SHADOWstyle;         /* Shadow style         */
  1160.              Boolean     noOutlineStyle, OUTLINEstyle;       /* Outline style        */
  1161.              Boolean     noUnderline, UNDERLINEstyle;        /* Underline style      */
  1162.              Boolean     noItalicStyle, ITALICstyle;         /* Italic style         */
  1163.              Boolean     noBoldStyle, BOLDstyle;             /* Bold style           */
  1164.              integer = $$CountOf(KerningTableEntry);         /* # of entries         */
  1165.              wide array KerningTableEntry {
  1166.                  char;                                       /* first char of pair   */
  1167.                  char;                                       /* second char of pair  */
  1168.                  unsigned hex integer;                       /* kerning offset       */
  1169.              };
  1170.          };
  1171.      };
  1172. };
  1173. _______________________________________________________________________________
  1174.  
  1175. »FONTS AND THEIR FAMILIES
  1176. _______________________________________________________________________________
  1177.  
  1178. Note:  The extensions to the Font Manager described in the following section
  1179.        were originally documented in Inside Macintosh, Volume IV.  As such,
  1180.        this information refers to the 128K ROMs and System file version 3.2
  1181.        and later.
  1182.  
  1183. In the 64K ROM version of the Font Manager, font is defined as the complete set of
  1184. characters of one typeface; it doesn’t include the size of the characters, and usually
  1185. doesn’t include any stylistic variations. In other words, fonts are defined in the
  1186. plain style and stylistic variations, such as bold and italic, are applied to them.
  1187. For example, Times plain (or roman) defines the font, while Times italic is a stylistic
  1188. variation applied to that font.
  1189.  
  1190. In the 128K ROM version, the definition of a font is broadened to include stylistic
  1191. variations. That is, a separate font can be defined for certain stylistic variations
  1192. of a typeface. The set of available fonts for a given typeface is known as a font
  1193. family.
  1194.  
  1195. This allows QuickDraw to use an actual font instead of modifying a plain font, thereby
  1196. improving speed and readability. For example, suppose the user of a word processor
  1197. selects a phrase in 12-point Times Roman and chooses the italic style from a menu.
  1198. QuickDraw asks for an italic Times and, assuming that the proper resources are available,
  1199. the Font Manager returns a 12-point Times Italic font. QuickDraw could then draw the
  1200. phrase from an actual italic font rather than having to slant the plain font.
  1201.  
  1202. Note:  The standard stylistic variations will still be performed by
  1203.        QuickDraw when they’re not available as actual fonts.
  1204.  
  1205. Information about fonts and their families is stored as resources in resource files;
  1206. the Font Manager calls the Resource Manager to read them into memory. Fonts are
  1207. stored as resources of type 'FONT' or 'NFNT'. Fonts known to the system are stored in
  1208. the system resource file; you may also define your own fonts and include them in your
  1209. application’s resource file. The information about a font family is stored as a
  1210. resource of type 'FOND'; this includes the resource IDs of all the fonts in the
  1211. family, as shown in Figure 2.
  1212.  
  1213. •••Refer to Figure 2.•••
  1214.  
  1215. Figure 2–Font Manager Resources
  1216.  
  1217. •••Refer to Technical Note #198:•••
  1218.  
  1219. The 'NFNT' resource is new to the 128K ROM version of the Font Manager; it has the
  1220. same format as the 'FONT' resource and allows for many more fonts. An 'NFNT' resource
  1221. type can also be used to mask all but plain fonts from appearing in a font menu. In
  1222. this way, the system resource file can contain Times, Times Italic, Times Bold, and
  1223. Times Bold Italic, yet only Times will appear on the Font Menu. (The user would need
  1224. to choose Italic from the Style menu.)
  1225.  
  1226. The 64K ROM can only handle 'FONT' resources; it ignores resources of type
  1227. 'NFNT' and 'FOND'.
  1228.  
  1229. Warning:  If you’re creating a font, be sure to read the section
  1230.           “Restrictions on the 'FONT' type” below for information
  1231.           on maintaining compatibility with the 64K ROMs.
  1232.  
  1233. It’s crucial that all new fonts have a corresponding 'FOND' resource. A minimal
  1234. 'FOND' resource can be made for a font by using the Font/DA Mover (version 3.0 or
  1235. later) to copy the font into a different file that has no font with the same name.
  1236.  
  1237. Note:  A 'FOND' resource created this way does not contain any optional
  1238.        tables, but it does contain the font association table (described
  1239.        below) that maps family numbers and font sizes into resource IDs.
  1240.  
  1241. Warning:  Be aware that when a 'FOND' is present, the Font Manager uses
  1242.           it exclusively to determine which fonts are available. Fonts
  1243.           should be added to or deleted from the System file with a tool
  1244.           like the Font/DA Mover, which correctly updates the 'FOND' as
  1245.           well as the 'FONT'.
  1246.  
  1247. The Font Manager uses these resources to build two data structures in the application
  1248. heap. The font record contains information about a font and the family record contains
  1249. information about a font family.
  1250.  
  1251. »Restrictions on the 'FONT' Type
  1252.  
  1253. For backward compatibility, all 'FONT' resources that are part of a 'FOND' have
  1254. certain restrictions:
  1255.  
  1256.   1.  The font name and family name must be identical.
  1257.   2.  The font number and family number must be identical since the
  1258.       Font Manager interprets a family number as a font number.
  1259.   3.  The resource ID of the font must be the same number that would
  1260.       be produced by concatenating the font number and the font size.
  1261.  
  1262. These restrictions ensure that both the 64K ROM and 128K ROM versions of the Font
  1263. Manager will associate the family number and point size with the proper corresponding
  1264. font resource ID, whether or not there’s a family resource. 'NFNT' resources are not
  1265. bound by these restrictions (but neither will they be found by the 64K ROM version of
  1266. the Font Manager).
  1267.  
  1268. æKY FONT
  1269. æC  /*----------------------------FONT • Font Description-----------------------------------*/
  1270. /* PROBLEMS: the offset to the offset/width table has been changed to a longint, with the
  1271.           high word stored in the neg descent field (if its not -1).  Rez can't handle
  1272.           this. */
  1273. type 'FONT' {    
  1274.      /* Font Type Flags */
  1275. FontType:
  1276.      boolean = 1;                                            /* Reserved             */
  1277.      boolean     doExpandFont, dontExpandFont;
  1278.      boolean     proportionalFont, fixedWidthFont;
  1279.      boolean = 1;                                            /* Reserved             */
  1280.      unsigned bitstring[2] = 0;                              /* Reserved             */
  1281.      boolean     blackFont, colorFont;
  1282.      boolean     notSynthetic, isSynthetic;
  1283.      boolean     nofctbRsrc, hasfctbRsrc;
  1284.      unsigned bitstring[3] = 0;                              /* Reserved             */
  1285.      unsigned bitstring[2]   oneBit, twoBit,                 /* Font depth           */
  1286.                              fourBit, eightBit;
  1287.      boolean     noCharWidthTable, hasCharWidthTable;
  1288.      boolean     noImageHeightTable, hasImageHeightTable;
  1289.  
  1290.  FirstChar:
  1291.      integer;                                                /* first char           */
  1292.  LastChar:
  1293.      integer;                                                /* last char            */
  1294.      integer;                                                /* width max            */
  1295.      integer;                                                /* kern max             */
  1296.      integer;                                                /* neg descent          */
  1297.      integer;                                                /* font rect width      */
  1298.  Height:
  1299.      integer;                                                /* font rect height     */
  1300.  Offset:
  1301.      unsigned integer = ((WidthTable-Offset)/16);            /* offset to off/wid tab*/      
  1302.      integer;                                                /* ascent               */
  1303.      integer;                                                /* descent              */
  1304.      integer;                                                /* leading              */
  1305.  RowWords:
  1306.      integer;                                                /* row width (in words) */
  1307.      
  1308.      /* Tables */
  1309.      /* Bit image */
  1310.      hex string [($$Word(RowWords) <<($$BitField(FontType, 12, 2)
  1311.          & 3) + 1) * $$Word(Height)];
  1312.  
  1313.      /* Location Table */
  1314.      array [$$Word(LastChar) - $$Word(FirstChar) + 3] {
  1315.          integer;
  1316.      };
  1317.      
  1318.      /* Offset/Width Table */
  1319.  WidthTable:
  1320.      array [$$Word(LastChar) - $$Word(FirstChar) + 3] {
  1321.          integer;
  1322.      };
  1323. };
  1324. _______________________________________________________________________________
  1325.  
  1326. »FONTS AND THEIR FAMILIES
  1327. _______________________________________________________________________________
  1328.  
  1329. Note:  The extensions to the Font Manager described in the following section
  1330.        were originally documented in Inside Macintosh, Volume IV.  As such,
  1331.        this information refers to the 128K ROMs and System file version 3.2
  1332.        and later.
  1333.  
  1334. In the 64K ROM version of the Font Manager, font is defined as the complete set of
  1335. characters of one typeface; it doesn’t include the size of the characters, and usually
  1336. doesn’t include any stylistic variations. In other words, fonts are defined in the
  1337. plain style and stylistic variations, such as bold and italic, are applied to them.
  1338. For example, Times plain (or roman) defines the font, while Times italic is a stylistic
  1339. variation applied to that font.
  1340.  
  1341. In the 128K ROM version, the definition of a font is broadened to include stylistic
  1342. variations. That is, a separate font can be defined for certain stylistic variations
  1343. of a typeface. The set of available fonts for a given typeface is known as a font
  1344. family.
  1345.  
  1346. This allows QuickDraw to use an actual font instead of modifying a plain font, thereby
  1347. improving speed and readability. For example, suppose the user of a word processor
  1348. selects a phrase in 12-point Times Roman and chooses the italic style from a menu.
  1349. QuickDraw asks for an italic Times and, assuming that the proper resources are available,
  1350. the Font Manager returns a 12-point Times Italic font. QuickDraw could then draw the
  1351. phrase from an actual italic font rather than having to slant the plain font.
  1352.  
  1353. Note:  The standard stylistic variations will still be performed by
  1354.        QuickDraw when they’re not available as actual fonts.
  1355.  
  1356. Information about fonts and their families is stored as resources in resource files;
  1357. the Font Manager calls the Resource Manager to read them into memory. Fonts are
  1358. stored as resources of type 'FONT' or 'NFNT'. Fonts known to the system are stored in
  1359. the system resource file; you may also define your own fonts and include them in your
  1360. application’s resource file. The information about a font family is stored as a
  1361. resource of type 'FOND'; this includes the resource IDs of all the fonts in the
  1362. family, as shown in Figure 2.
  1363.  
  1364. •••Refer to Figure 2.•••
  1365.  
  1366. Figure 2–Font Manager Resources
  1367.  
  1368. •••Refer to Technical Note #198:•••
  1369.  
  1370. The 'NFNT' resource is new to the 128K ROM version of the Font Manager; it has the
  1371. same format as the 'FONT' resource and allows for many more fonts. An 'NFNT' resource
  1372. type can also be used to mask all but plain fonts from appearing in a font menu. In
  1373. this way, the system resource file can contain Times, Times Italic, Times Bold, and
  1374. Times Bold Italic, yet only Times will appear on the Font Menu. (The user would need
  1375. to choose Italic from the Style menu.)
  1376.  
  1377. The 64K ROM can only handle 'FONT' resources; it ignores resources of type
  1378. 'NFNT' and 'FOND'.
  1379.  
  1380. Warning:  If you’re creating a font, be sure to read the section
  1381.           “Restrictions on the 'FONT' type” below for information
  1382.           on maintaining compatibility with the 64K ROMs.
  1383.  
  1384. It’s crucial that all new fonts have a corresponding 'FOND' resource. A minimal
  1385. 'FOND' resource can be made for a font by using the Font/DA Mover (version 3.0 or
  1386. later) to copy the font into a different file that has no font with the same name.
  1387.  
  1388. Note:  A 'FOND' resource created this way does not contain any optional
  1389.        tables, but it does contain the font association table (described
  1390.        below) that maps family numbers and font sizes into resource IDs.
  1391.  
  1392. Warning:  Be aware that when a 'FOND' is present, the Font Manager uses
  1393.           it exclusively to determine which fonts are available. Fonts
  1394.           should be added to or deleted from the System file with a tool
  1395.           like the Font/DA Mover, which correctly updates the 'FOND' as
  1396.           well as the 'FONT'.
  1397.  
  1398. The Font Manager uses these resources to build two data structures in the application
  1399. heap. The font record contains information about a font and the family record contains
  1400. information about a font family.
  1401.  
  1402. »Restrictions on the 'FONT' Type
  1403.  
  1404. For backward compatibility, all 'FONT' resources that are part of a 'FOND' have
  1405. certain restrictions:
  1406.  
  1407.   1.  The font name and family name must be identical.
  1408.   2.  The font number and family number must be identical since the
  1409.       Font Manager interprets a family number as a font number.
  1410.   3.  The resource ID of the font must be the same number that would
  1411.       be produced by concatenating the font number and the font size.
  1412.  
  1413. These restrictions ensure that both the 64K ROM and 128K ROM versions of the Font
  1414. Manager will associate the family number and point size with the proper corresponding
  1415. font resource ID, whether or not there’s a family resource. 'NFNT' resources are not
  1416. bound by these restrictions (but neither will they be found by the 64K ROM version of
  1417. the Font Manager).
  1418.  
  1419. æKY FWID
  1420. æC  /*----------------------------FWID • Font Width Table-----------------------------------*/
  1421. type 'FWID' {
  1422.      unsigned hex integer;                                   /* Font type            */
  1423.      integer;                                                /* first char           */
  1424.      integer;                                                /* last char            */
  1425.      integer;                                                /* width max            */
  1426.      integer;                                                /* kern max             */
  1427.      integer;                                                /* neg descent          */
  1428.      integer;                                                /* font rect width      */
  1429.      integer;                                                /* font rect height     */
  1430.      unsigned hex integer;                                   /* offset to off/wid tab*/
  1431.      integer;                                                /* ascent               */
  1432.      integer;                                                /* descent              */
  1433.      integer;                                                /* leading              */
  1434.      integer;                                                /* row width (in words) */
  1435.      wide array {                                            /* offset/width table   */
  1436.          byte;                                               /* char offset          */
  1437.          byte;                                               /* char width           */
  1438.      };
  1439. };
  1440.  
  1441. A resource type can be defined that consists of only the character widths and general
  1442. font information—everything but the font’s bit image and location table. If this
  1443. 'FWID' resource type exists, it will be read in whenever QuickDraw doesn’t need to
  1444. draw the text, such as when you call one of the routines CharWidth, HidePen, or
  1445. OpenPicture (which calls HidePen). The FontRec data type described above, minus the
  1446. rowWords, bitImage, and locTable fields, reflects the structure of the 'FWID' resource
  1447. type. The owTLoc field will contain 4, and the fontType field will contain the following
  1448. predefined constant:
  1449.  
  1450. CONST fontWid = $ACB0; {font width data}
  1451.  
  1452. Note:  The extensions to the Font Manager described in the following paragraphs
  1453.        were originally documented in Inside Macintosh, Volume IV.  As such,
  1454.        this information refers to the 128K ROMs and System file version 3.2
  1455.        and later.
  1456.  
  1457. To maintain compatibility with existing applications, the order of the fields in the
  1458. font record remains unchanged; two variable-length arrays are added at the end of the
  1459. record, however, to implement fractional character widths.
  1460.  
  1461.   Number of bytes    Contents
  1462.  
  1463.       m bytes        Optional character-width table of font
  1464.                          m = 2 * (lastChar–firstChar+3)
  1465.       m bytes        Optional image-height table of font
  1466.                          m = 2 * (lastChar–firstChar+3)
  1467.  
  1468. The various sizes of a font are each stored as separate resources. The resource type
  1469. for a font is either 'FONT' or 'NFNT', which is simply the original font record with
  1470. the two additional variable-length arrays added at the end of the record.
  1471.  
  1472. Additional constants have been defined for use in the fontType field; it can now
  1473. contain any of the following values:
  1474.  
  1475. CONST  propFont   = $9000;    {proportional font}
  1476.        prpFntH    = $9001;    { with height table}
  1477.        prpFntW    = $9002;    { with width table}
  1478.        prpFntHW   = $9003;    { with height & width tables}
  1479.  
  1480.        fixedFont  = $B000;    {fixed-width font}
  1481.        fxdFntH    = $B001;    { with height table}
  1482.        fxdFntW    = $B002;    { with width table}
  1483.        fxdFntHW   = $B003;    { with height & width tables}
  1484.  
  1485.        fontWid    = $ACB0;    {font width data:  64K ROM only}
  1486.  
  1487. The low-order two bits of the fontType field tell whether the two optional tables are
  1488. present. If bit 0 is set, there’s an image-height table; if bit 1 is set, there’s a
  1489. character width table.
  1490.  
  1491. The optional character-width table immediately follows the offset/width table; it’s a
  1492. variable-length array specifying the fixed-point character widths for each character
  1493. in the font. Each entry is a word in length. For compactness, a special 16-bit fixed-point
  1494. format is used with an unsigned integer part in the high-order byte and a fractional
  1495. part in the low-order byte.
  1496.  
  1497. •••Refer to Technical Note #30:•••
  1498.  
  1499. The optional image-height table, which speeds the drawing of characters, may also be
  1500. appended after the character-width table; it’s a variable-length array specifying the
  1501. image height of each character in the font. Each entry is a word in length; the
  1502. high-order byte is the offset of the first non-white row in the character; the low-order
  1503. byte is the number of rows that must be drawn. The image height is the height of the
  1504. character image and is less than or equal to the font height; it’s used in conjunction
  1505. with QuickDraw for improved character plotting. Most font resources don’t contain
  1506. this table; it’s typically generated by the Font Manager when the font is swapped
  1507. in.
  1508.  
  1509. Note:  The 64K ROM version of the Resource Manager limits the total space
  1510.        occupied by the bit image, location table, offset/width table, and
  1511.        character-width and image-height tables to 32K bytes. For this reason,
  1512.        the practical limit on the font size of a full font is about 40 points.
  1513.  
  1514. Note:  The extensions to the Font Manager described in the following paragraphs
  1515.        were originally documented in Inside Macintosh, Volume V.  As such,
  1516.        this information refers to the Macintosh SE and Macintosh II ROMs and
  1517.        System file version 4.1 and later.
  1518.  
  1519. Several previously unused bits of the fontType field specify the font depth and other
  1520. related information (the new bits are marked by an asterisk):
  1521.  
  1522.   Bit    Meaning
  1523.  
  1524.   0      Set if there’s an image-height table
  1525.   1      Set if there’s a character-width table
  1526. * 2–3    Font depth (Macintosh II only—must be 0 otherwise)
  1527.   4–6    Reserved (should be 0)
  1528. * 7      Set if font has an 'fctb' resource (Macintosh II
  1529.          only—must be 0 otherwise)
  1530. * 8      Set if a synthetic font (Macintosh II only—must be 0 otherwise)
  1531. * 9      Set if font contains colors other than black (Macintosh II
  1532.          only—must be 0 otherwise)
  1533.   10–11  Reserved (should be 0)
  1534.   12     Reserved (should be 1)
  1535.   13     Set for fixed-width font, clear for proportional font
  1536. * 14     Set if font is not to be expanded (Macintosh II
  1537.          only—must be 0 otherwise)
  1538.   15     Reserved (should be 1)
  1539.  
  1540. Bit 2 and 3 specify the font depth and can contain the following values:
  1541.  
  1542.   Value    Font depth
  1543.     0      1-bit
  1544.     1      2-bit
  1545.     2      4-bit
  1546.     3      8-bit
  1547.  
  1548. The font depth is normally 0, indicating a font intended for a screen one bit deep. 
  1549. If bit 7 is set (and the font is an 'NFNT' resource), a resource of type 'fctb' with
  1550. the same ID as the font can optionally be provided to assign RGB colors to specific
  1551. pixel values.
  1552.  
  1553. Bit 8 is used only by the Font Manager to indicate a synthetic font, created dynamically
  1554. from the available font resources in response to a certain color and screen depth
  1555. combination.
  1556.  
  1557. Bit 9 is set if the font contains other than black.
  1558.  
  1559. Setting bit 14 indicates that the font should not be expanded by the Font Manager to
  1560. match the screen depth; some international fonts, such as kanji, are too large for
  1561. synthetic fonts to be effective or meaningful.
  1562.  
  1563. To accommodate multibit font depths, the owTLoc field has been changed to a long
  1564. word, the nDescent field becoming the high-order word.  (For backward compatibility,
  1565. nDescent is ignored if it’s negative.)
  1566.  
  1567. Note:  The 128K ROM version of the Font Manager limits the strike for a
  1568.        1-bit font to not quite 128K; this limits the largest practical
  1569.        font to about 127 points.  The Macintosh II ROM limits the largest
  1570.        practical font to about 255 points, regardless of the font depth.
  1571.  
  1572. æKY insc
  1573. æC  /*----------------------------insc • Installer Script-----------------------------------*/
  1574. #define  CommFlags                                                                          \
  1575.      boolean     noDelRemove, delRemove;             /* Remove file if remove clicked*/ \
  1576.      boolean     noDelInstall, delInstall;           /* Delete target before copy    */ \
  1577.      boolean     noCopy, copy;                       /* Copy file to destination     */ \
  1578.      fill bit[3];                                    /* Reserved                     */ \
  1579.      boolean     doReplace, dontReplace;             /* Replace                      */ \
  1580.      fill bit[1];                                    /* Reserved                     */ \
  1581.      boolean     old, noOld;                         /* Type & creator need not match*/ \
  1582.      boolean     noUpdateOnly, updateOnly            /* Only update if target exists */
  1583.  
  1584. #define  FileSpecFlags                                                                      \
  1585.      CommFlags;                                                                         \
  1586.      boolean     noRsrcFork, rsrcFork;               /* Apply operation to rsrc fork */ \
  1587.      boolean     noDataFork, dataFork;               /* Apply operation to data fork */ \
  1588.      boolean     needExist, needNotExist;            /* File need not exist          */ \
  1589.      boolean     noCrDate, crDate;                   /* Creation date must match     */ \
  1590.      boolean     noTypeCr, typeCr;                   /* Type and creator must match  */ \
  1591.      bitstring[1] = 1                                /* Indicates file specification */
  1592.  
  1593. #define  RsrcSpecFlags                                                                      \
  1594.      CommFlags;                                                                         \
  1595.      fill bit;                                       /* Reserved                     */ \
  1596.      boolean     noEvenIf, evenIf;                   /* Do it even if rsrc protected */ \
  1597.      boolean     needExist, needNotExist;            /* Rsrc need not exist          */ \
  1598.      fill bit;                                       /* Reserved                     */ \
  1599.      boolean noByID, byID;                           /* Use name or id to find rsrc  */ \
  1600.      bitstring[1] = 0                                /* Indicates rsrc specification */
  1601.  
  1602. #define  FileSpec                                                                           \
  1603.      FileSpecFlags;                                  /* FileSpec Flags               */ \
  1604.      literal longint;                                /* File Type                    */ \
  1605.      literal longint;                                /* File Creator                 */ \
  1606.      unsigned hex longint;                           /* Creation Date, use              \
  1607.                                                         $$DateToLongInt() to read in    \
  1608.                                                         the date.                    */ \
  1609.      fill long[3];                                   /* Handle, FDelSize, FAddSize   */ \
  1610.      pstring;                                        /* File Name                    */ \
  1611.      align word
  1612.  
  1613. type 'insc' {
  1614.      switch {
  1615.          case format0:
  1616.              key integer = 0;                                /* Script Format        */
  1617.              hex integer = 0;                                /* Script Flags         */
  1618.              pstring;                                        /* Script Name          */
  1619.              align word;
  1620.              wstring;                                        /* Script Help          */
  1621.              align word;
  1622.              unsigned integer = $$CountOf(FileList);         /* File List            */
  1623.              wide array FileList {
  1624.                  FileSpec;                                   /* File Spec            */
  1625.              };
  1626.              unsigned integer = $$CountOf(ResFileList);      /* Resource File List   */
  1627.              wide array ResFileList {
  1628.                  FileSpec;                                   /* Target File Spec     */
  1629.                  integer = $$CountOf(SrcFileList);           /* Source File List     */
  1630.                  wide array SrcFileList {
  1631.                      FileSpec;                               /* Source File Spec     */
  1632.                      unsigned integer = $$CountOf(ResList);  /* Resource List        */
  1633.                      wide array ResList {
  1634.                          RsrcSpecFlags;                      /* Resource Spec Flags  */
  1635.                          literal longint;                    /* Resource Type        */
  1636.                          integer;                            /* Source ID            */
  1637.                          integer;                            /* Target ID            */
  1638.                          fill word[2];                       /* CRC/Version, Filler1 */
  1639.                          fill long[3];                       /* Filler2, RDelSize,
  1640.                                                                  RAddSize            */
  1641.                          pstring;                            /* Resource Name        */
  1642.                          align word;
  1643.                          integer = 0;                        /* Previous CRC List    */
  1644.                      };
  1645.                  };
  1646.              };
  1647.              integer = 0;                                    /* Disk Blocks          */
  1648.  
  1649.          case format1:
  1650.              key integer = 1;                                /* Script Format        */
  1651.              hex integer = 0;                                /* Script Flags         */
  1652.              pstring;                                        /* Script Name          */
  1653.              align word;
  1654.              wstring;                                        /* Script Help          */
  1655.              align word;
  1656.              unsigned integer = $$CountOf(FileList);         /* File List            */
  1657.              wide array FileList {
  1658.                  FileSpec;                                   /* File Spec            */
  1659.              };
  1660.              unsigned integer = $$CountOf(ResFileList);      /* Resource File List   */
  1661.              wide array ResFileList {
  1662.                  FileSpec;                                   /* Target File Spec     */
  1663.                  integer = $$CountOf(SrcFileList);           /* Source File List     */
  1664.                  wide array SrcFileList {
  1665.                      FileSpec;                               /* Source File Spec     */
  1666.                      unsigned integer = $$CountOf(ResList);  /* Resource List        */
  1667.                      wide array ResList {
  1668.                          RsrcSpecFlags;                      /* Resource Spec Flags  */
  1669.                          literal longint;                    /* Resource Type        */
  1670.                          integer;                            /* Source ID            */
  1671.                          integer;                            /* Target ID            */
  1672.                          fill word[2];                       /* CRC/Version, Filler1 */
  1673.                          fill long[3];                       /* Filler2, RDelSize,
  1674.                                                                 RAddSize             */
  1675.                          pstring;                            /* Resource Name        */
  1676.                          align word;
  1677.                          integer = 0;                        /* Previous CRC List    */
  1678.                      };
  1679.                  };
  1680.              };
  1681.              unsigned integer;                               /* Boot Block Version   */
  1682.              unsigned integer;                               /* Number of Open Files */
  1683.              unsigned integer;                               /* Number of Events     */
  1684.              unsigned hex longint;                           /* Sys Heap Size 128K   */
  1685.              unsigned hex longint;                           /* Sys Heap Size 256K   */
  1686.              unsigned hex longint;                           /* Sys Heap Size 512K   */
  1687.        };
  1688. };
  1689. æKY INTL0
  1690. æC  /*----------------------------INTL (0) • International Formatting Information-----------*/
  1691. type 'INTL' (0) {
  1692.      char        period = periodSymbol;                      /* decimal pt sep       */
  1693.      char        comma = commaSymbol;                        /* thousands sep        */
  1694.      char        semicolon = semicolonSymbol;                /* list sep             */
  1695.      char        dollarsign = dollarsignSymbol;              /* currSym1             */
  1696.      char;                                                   /* currSym2             */
  1697.      char;                                                   /* currSym3             */
  1698.  
  1699.      /* currFmt */
  1700.      boolean     noLeadZero, leadingZero;                    /* leading unit zero    */
  1701.      boolean     noTrailingZero, trailingZero;               /* trailing dec zero    */
  1702.      boolean     paren, minusSign;                           /* negative rep         */
  1703.      boolean     trails, leads;                              /* curr sym position    */
  1704.      fill bit[4];                                            /* not used             */
  1705.      byte        monDayYear, dayMonYear, yearMonDay;         /* dateOrder            */
  1706.  
  1707.      /* shrtDateFmt */
  1708.      boolean     noCentury, century;                         /* century incl         */
  1709.      boolean     noMonthLeadZero, monthLeadZero;             /* mon lead zero        */
  1710.      boolean     noDayLeadZero, dayLeadZero;                 /* day lead zero        */
  1711.      fill bit[5];                                            /* filler               */
  1712.      char        slash = slashSymbol;                        /* date sep             */
  1713.      byte        twentyFourHour, twelveHour = 255;           /* timeCycle            */
  1714.  
  1715.      /* timeFmt */
  1716.      boolean     noHoursLeadZero, hoursLeadZero;             /* hours lead zero      */
  1717.      boolean     noMinutesLeadZero, minutesLeadZero;         /* min lead zero        */
  1718.      boolean     noSecondsLeadZero, secondsLeadZero;         /* sec lead zero        */
  1719.      fill bit[5];                                            /* filler               */
  1720.      string[4];                                              /* mornStr              */
  1721.      string[4];                                              /* eveStr               */
  1722.      char;                                                   /* timeSep              */
  1723.      char;                                                   /* time1Stuff           */
  1724.      char;                                                   /* time2Stuff           */
  1725.      char;                                                   /* time3Stuff           */
  1726.      char;                                                   /* time4Stuff           */
  1727.      char;                                                   /* time5Stuff           */
  1728.      char;                                                   /* time6Stuff           */
  1729.      char;                                                   /* time7Stuff           */
  1730.      char;                                                   /* time8Stuff           */
  1731.      byte        standard, metric = 255;                     /* metricSys            */
  1732.      byte        Country;                                    /* INTL0 country        */
  1733.      byte;                                                   /* version              */
  1734. };
  1735. æKY itl0
  1736. æC  /*----------------------------itl0 • International Formatting Information---------------*/
  1737. type 'itl0' as 'INTL' (0);
  1738. æKY INTL1
  1739. æC  /*----------------------------INTL (1) • International Date/Time Information------------*/
  1740. type 'INTL' (1) {            
  1741.      /* Day names */
  1742.      array [7] {
  1743.          pstring[15];                                        /* Sunday, Monday...    */                  
  1744.      };
  1745.      
  1746.      /* Month names */
  1747.      array [12] {
  1748.          pstring[15];                                        /* January, February... */                      
  1749.      };
  1750.  
  1751.      byte        dayName, none=255;                          /* suppressDay          */
  1752.      byte        dayMonYear, monDayYear = 255;               /* longDate format      */
  1753.      byte        noDayLeadZero, dayLeadZero = 255;           /* dayLeading0          */
  1754.      byte;                                                   /* abbrLen              */
  1755.      string[4];                                              /* st0                  */
  1756.      string[4];                                              /* st1                  */
  1757.      string[4];                                              /* st2                  */
  1758.      string[4];                                              /* st3                  */
  1759.      string[4];                                              /* st4                  */
  1760.      byte        Country;                                    /* INTL1 country        */
  1761.      byte;                                                   /* version              */
  1762.      hex string  DefaultReturn = "\$4E\$75";                 /* local routine - If
  1763.                                                                 you have one, use 
  1764.                                                                 $$Resource to insert
  1765.                                                                 code here.  Otherwise,
  1766.                                                                 you must have a 68000
  1767.                                                                 return instruction.
  1768.                                                                 Use DefaultReturn.   */
  1769. };
  1770. æKY itl1
  1771. æC  /*----------------------------itl1 • International Date/Time Information----------------*/
  1772. type 'itl1' as 'INTL' (1);
  1773. æKY itl2
  1774. æC  /*----------------------------itl2 • International String Comparision Package Hooks-----*/
  1775. type 'itl2' {
  1776. /*
  1777.  * The type definition for 'itl2' changed between systems 6.0.3 and 6.0.4.
  1778.  * If the fourth integer of this type is -1, the resource is of the new type.
  1779.  * There's no clean way to merge both definitions into one type that Rez and
  1780.  * DeRez could handle.  If you're trying to create or decompile a pre-6.0.4
  1781.  * 'itl2' resource, add -d SYSTEMVERSION=0x060003 to your Rez or DeRez command.
  1782.  */
  1783. #ifndef SYSTEMVERSION
  1784.  #define SYSTEMVERSION 0x060004  // version 6.0.4
  1785. #endif
  1786. #if SYSTEMVERSION >= 0x060004
  1787.      unsigned integer = initHookOffset >> 3;             /* init hook offset         */
  1788.      unsigned integer = fetchHookOffset >> 3;            /* fetch hook offset        */
  1789.      unsigned integer = vernierHookOffset >> 3;          /* vernier hook offset      */
  1790.      unsigned integer = projectHookOffset >> 3;          /* project hook offset      */
  1791.      integer = -1;                                       /* MODIFIED format flag     */
  1792.      unsigned integer = rsvd2HookOffset >> 3;            /* rsvd2 hook offset        */
  1793.  
  1794.      /* new offsets, for new tables */
  1795.      unsigned integer = typeListOffset >> 3;             /* TypeList offset          */
  1796.      unsigned integer = classArrayOffset >> 3;           /* ClassArray offset        */
  1797.      unsigned integer = upperListOffset >> 3;            /* UpperList offset         */
  1798.      unsigned integer = lowerListOffset >> 3;            /* LowerList offset         */
  1799.      unsigned integer = upperNoMarkListOffset >> 3;      /* UpperNoMarkList offset   */
  1800.      unsigned integer = wordTableOffset >> 3;            /* WordTable offset         */
  1801.      unsigned integer = wrapTableOffset >> 3;            /* WrapTable offset         */
  1802.      unsigned integer = noMarkListOffset >> 3;           /* NoMarkList offset        */
  1803.      unsigned hex integer;                               /* version number           */
  1804.      unsigned integer;                                   /* reserved                 */
  1805.  
  1806.      /* the current routines */
  1807. initHookOffset:
  1808.      hex string [(fetchHookOffset - initHookOffset) >> 3];           /* code */
  1809. fetchHookOffset:
  1810.      hex string [(vernierHookOffset - fetchHookOffset) >> 3];        /* code */
  1811. vernierHookOffset:
  1812.      hex string [(projectHookOffset - vernierHookOffset) >> 3];      /* code */
  1813. projectHookOffset:
  1814.      hex string [(rsvd2HookOffset - projectHookOffset) >> 3];        /* code */
  1815. /* no rsvd1Hook label in new format */
  1816.      /* no rsvd1Hook code in new format */
  1817. rsvd2HookOffset:
  1818.      hex string [(classArrayOffset - rsvd2HookOffset) >> 3];         /* code */
  1819.  
  1820.      /* the new tables; note that order is different than the offset order above */
  1821. classArrayOffset:
  1822.      hex string [(typeListOffset - classArrayOffset) >> 3];          /* table */
  1823. typeListOffset:
  1824.      hex string [(upperListOffset - typeListOffset) >> 3];           /* table */
  1825. upperListOffset:
  1826.      hex string [(lowerListOffset - upperListOffset) >> 3];          /* table */
  1827. lowerListOffset:
  1828.      hex string [(upperNoMarkListOffset - lowerListOffset) >> 3];    /* table */
  1829. upperNoMarkListOffset:
  1830.      hex string [(noMarkListOffset - upperNoMarkListOffset) >> 3];   /* table */
  1831. noMarkListOffset:
  1832.      hex string [(wordTableOffset - noMarkListOffset) >> 3];         /* table */
  1833. wordTableOffset:
  1834.      hex string [(wrapTableOffset - wordTableOffset) >> 3];          /* table */
  1835. wrapTableOffset:
  1836.      hex string;
  1837. #else
  1838.      unsigned integer = initHookOffset >> 3;                 /* init hook offset     */
  1839.      unsigned integer = fetchHookOffset >> 3;                /* fetch hook offset    */
  1840.      unsigned integer = vernierHookOffset >> 3;              /* vernier hook offset  */
  1841.      unsigned integer = projectHookOffset >> 3;              /* project hook offset  */
  1842.      unsigned integer = rsvd1HookOffset >> 3;                /* Rsvd1 hook offset    */
  1843.      unsigned integer = rsvd2HookOffset >> 3;                /* Rsvd2 hook offset    */
  1844. initHookOffset:
  1845.      hex string [(fetchHookOffset - initHookOffset) >> 3];   /* init hook code       */
  1846. fetchHookOffset:
  1847.      hex string [(vernierHookOffset - fetchHookOffset) >> 3];/* fetch hook code      */
  1848. vernierHookOffset:
  1849.      hex string [(projectHookOffset - vernierHookOffset) >> 3];/* vernier hook code  */
  1850. projectHookOffset:
  1851.      hex string [(rsvd1HookOffset - projectHookOffset) >> 3];/* project hook code    */
  1852. rsvd1HookOffset:
  1853.      hex string [(rsvd2HookOffset - rsvd1HookOffset) >> 3];  /* rsvd1 hook code      */
  1854. rsvd2HookOffset:
  1855.      hex string;                                             /* rsvd2 hook code      */
  1856. #endif
  1857. };
  1858.  
  1859. æKY itl4
  1860. æC  /*----------------------------itl4 • International Tokenizer----------------------------*/
  1861. type 'itl4' {
  1862.      unsigned hex integer;                                   /* flags                */
  1863.      literal longint = 'itl4';                               /* resource type        */
  1864.      integer;                                                /* resource ID          */
  1865.      integer = $0100;                                        /* version number       */
  1866.      longint = 0;                                            /* reserved             */
  1867.      longint = 0;                                            /* reserved             */
  1868.  
  1869.      integer = 8;                                            /* # of table entries   */
  1870.  
  1871.      unsigned longint = mapCharOffset >> 3;                  /* MapChar offset       */
  1872.      unsigned longint = stringCopyOffset >> 3;               /* stringCopy offset    */
  1873.      unsigned longint = extendFetchOffset >> 3;              /* extendFetch offset   */
  1874.      unsigned longint = unTokenOffset >> 3;                  /* unToken offset       */
  1875.      unsigned longint = defaultPartsTableOffset >> 3;        /* defaultParts offset  */
  1876.      unsigned longint = 0;                                   /* reserved offset      */
  1877.      unsigned longint = 0;                                   /* reserved offset      */
  1878.      unsigned longint = 0;                                   /* reserved offset      */
  1879.      unsigned longint = 0;                                   /* reserved offset      */
  1880.  
  1881.      longint = $$CountOf(MapChar);
  1882. mapCharOffset:
  1883.      array MapChar {
  1884.          byte;
  1885.      };
  1886.  
  1887. extendFetchOffset:
  1888.      hex string [(stringCopyOffset - extendFetchOffset) >> 3];/* extendFetch code    */
  1889. stringCopyOffset:
  1890.      hex string [(unTokenOffset - stringCopyOffset) >> 3];   /* stringCopy code      */
  1891. unTokenOffset:
  1892.      integer = (defaultPartsTableOffset - unTokenOffset) >> 3;/* unToken table size  */
  1893. unTokenSize:
  1894.      integer = $$CountOf(unToken) - 1;
  1895.      array unToken {
  1896.          integer;                                            /* offset to token strings*/
  1897.      };
  1898.      array [$$Word(unTokenSize) + 1] {
  1899.  unTokenItemOffset:
  1900.          pstring;                                            /* token strings        */
  1901.          align word;
  1902.      };
  1903.      
  1904. defaultPartsTableOffset:
  1905.      integer = 1;                                            /* version number       */
  1906.      wide array [31] {
  1907.          unsigned byte;
  1908.          char;
  1909.      };
  1910.      integer;                                                /* size                 */
  1911.      wide array [10] {
  1912.          unsigned byte;
  1913.          char;
  1914.      };
  1915.      integer;                                                /* size                 */
  1916.      wide array [10] {
  1917.          unsigned byte;
  1918.          char;
  1919.      };
  1920.      integer;                                                /* size                 */
  1921.      wide array [10] {
  1922.          unsigned byte;
  1923.          char;
  1924.      };
  1925.      integer;                                                /* size                 */
  1926.      wide array [10] {
  1927.          unsigned byte;
  1928.          char;
  1929.      };
  1930.      hex string [20] = "";
  1931. };
  1932. _______________________________________________________________________________
  1933.  
  1934. »'Itl4' RESOURCE
  1935. _______________________________________________________________________________
  1936.  
  1937. There is a new international resource, 'itl4', which contains information used by
  1938. several of the 2.0 routines and must be localized for each script (including Roman).
  1939.  
  1940. In Pascal:
  1941.  
  1942.   Itl4Rec    = RECORD
  1943.                  flags:           integer;
  1944.                  resourceType:    longInt;
  1945.                  resourceNum:     integer;
  1946.                  version:         integer;
  1947.                  resHeader1:      longInt;
  1948.                  resHeader2:      longInt;
  1949.                  numTables:       integer;    { one-based }
  1950.                  mapOffset:       longInt;    { offsets are from record start }
  1951.                  strOffset:       longInt;
  1952.                  fetchOffset:     longInt;
  1953.                  unTokenOffset:   longInt;
  1954.                  defPartsOffset:  longInt;
  1955.                  resOffset6:      longInt;
  1956.                  resOffset7:      longInt;
  1957.                  resOffset8:      longInt;
  1958.                  { the rest is data pointed to by offsets}
  1959.                END;
  1960.  
  1961.   Itl4Ptr    = ^Itl4Rec;
  1962.   Itl4Handle = ^Itl4Ptr;
  1963.  
  1964. In C:
  1965.  
  1966.   struct Itl4Rec {
  1967.           short    flags;
  1968.           long     resourceType;
  1969.           short    resourceNum;
  1970.           short    version;
  1971.           long     resHeader1;
  1972.           long     resHeader2;
  1973.           short    numTables;            /*one-based*/
  1974.           long     mapOffset;            /*offsets are from record start*/
  1975.           long     strOffset;
  1976.           long     fetchOffset;
  1977.           long     unTokenOffset;
  1978.           long     defPartsOffset;
  1979.           long     resOffset6;
  1980.           long     resOffset7;
  1981.           long     resOffset8;
  1982.   };
  1983.  
  1984.   #ifndef __cplusplus
  1985.   typedef struct Itl4Rec Itl4Rec;
  1986.   #endif
  1987.  
  1988.   typedef Itl4Rec *Itl4Ptr, **Itl4Handle;
  1989.  
  1990. æKY itlb
  1991. æC  /*----------------------------itlb • International Script Bundle------------------------*/
  1992. type 'itlb' {
  1993.      unsigned integer;                                       /* itl0 id number       */
  1994.      unsigned integer;                                       /* itl1 id number       */
  1995.      unsigned integer;                                       /* itl2 id number       */
  1996.      unsigned hex integer;                                   /* script flags - see
  1997.                                                                 smScriptFlags info
  1998.                                                                 in ScriptEqu.a       */
  1999.      unsigned integer;                                       /* itl4 id number       */
  2000.      unsigned integer;                                       /* reserved             */
  2001.      unsigned integer;                                       /* Script language      */
  2002.      unsigned integer;                                       /* high byte - number
  2003.                                                                 representation code,
  2004.                                                                 low byte - date
  2005.                                                                 representation code  */
  2006.      unsigned integer;                                       /* KCHR id number       */
  2007.      unsigned integer;                                       /* SICN id number       */
  2008. };
  2009. æKY itlc
  2010. æC  /*----------------------------itlc • International Configuration------------------------*/
  2011. type 'itlc' {
  2012.      unsigned integer;                                       /* system script code   */
  2013.      unsigned integer;                                       /* keyboard cache size  */
  2014.      byte            noFontForce, fontForce = 255;           /* font force flag      */
  2015.      byte            noIntlForce, intlForce = 255;           /* intl force flag      */
  2016.      byte            noOldKeyboard;                          /* old keyboard         */
  2017.      unsigned hex byte;                                      /* general flags - see
  2018.                                                                 smGenFlags info in
  2019.                                                                 ScriptEqu.a          */
  2020.      integer;                                                /* script icon offset   */
  2021.      byte            rightOffset, leftOffset = 255;          /* menu side for offset */
  2022.      byte;                                                   /* icon data (rsvd)     */
  2023.      hex string [36];                                        /* reserved             */
  2024. };
  2025. æKY itlk
  2026. æC  /*----------------------------itlk • Keyboard-dependent Remapping-----------------------*/
  2027. type 'itlk' {
  2028.      integer = $$CountOf(RemapItemArray);
  2029.      wide array RemapItemArray {
  2030.          integer;                                            /* keyboard type        */
  2031.          hex byte;                                           /* old modifier bits    */
  2032.          byte;                                               /* old key code         */
  2033.          hex byte;                                           /* modifier bits mask   */
  2034.          byte;                                               /* key code mask        */
  2035.          hex byte;                                           /* new modifier bits    */
  2036.          byte;                                               /* new key code         */
  2037.      };
  2038. };
  2039. æKY KCAP
  2040. æC  /*----------------------------KCAP • Physical Layout of Keyboard------------------------*/
  2041. type 'KCAP' {
  2042.      rect;                                                   /* boundsRect           */
  2043.      rect;                                                   /* textRect             */
  2044.      integer = $$CountOf(MainArray);
  2045.      array MainArray {
  2046.          integer = $$CountOf(ShapeArray) - 1;
  2047.          wide array ShapeArray {
  2048.              point;                                          /* shapePoint           */
  2049.          };
  2050.          integer = $$CountOf(KeyArray) - 1;
  2051.          wide array KeyArray {
  2052.              byte;                                           /* mask                 */
  2053.              boolean             or, and;
  2054.              bitstring[7];                                   /* keyCode              */
  2055.              integer;                                        /* dv                   */
  2056.              integer;                                        /* dh                   */
  2057.          };
  2058.      };
  2059. };
  2060. æKY KCHR
  2061. æC  /*----------------------------KCHR • ASCII Mapping (software)---------------------------*/
  2062. type 'KCHR' {
  2063.      integer;                                                /* Version              */
  2064.      wide array [$100] {                                     /* Indexes              */
  2065.          byte;
  2066.      };
  2067.      integer = $$CountOf(TableArray);
  2068.      array TableArray {
  2069.          wide array [$80] {                                  /* ASCII characters     */
  2070.              char;
  2071.          };
  2072.      };
  2073.      integer = $$CountOf(DeadArray);
  2074.      array DeadArray {
  2075.          byte;                                               /* Table number         */
  2076.          byte;                                               /* Virtual keycode      */
  2077.          integer = $$CountOf(CompletorArray);
  2078.          wide array CompletorArray {
  2079.              char;                                           /* Completor char       */
  2080.              char;                                           /* Substituting char    */
  2081.          };
  2082.          char;                                               /* No match char        */
  2083.          char;                                               /* 16-bits for the times
  2084.                                                                 when 8 isn't enough  */
  2085.      };
  2086. };
  2087. æKY KMAP
  2088. æC  /*----------------------------KMAP • Keyboard Mapping (hardware)------------------------*/
  2089. type 'KMAP' {
  2090.      integer;                                                /* ID                   */
  2091.      integer;                                                /* Version              */
  2092.      wide array [$80] {                                      /* Raw to virtual       */
  2093.          byte;                                               /*  keycode map         */
  2094.      };
  2095.      integer = $$CountOf(ExceptionArray);
  2096.      wide array ExceptionArray {
  2097.          byte;                                               /* Raw keycode          */
  2098.          boolean         noXor, Xor;
  2099.          fill bit[3];
  2100.          bitstring[4];                                       /* ADB op               */
  2101.          pstring;
  2102.      };
  2103. };
  2104. æKY KSWP
  2105. æC  /*----------------------------KSWP • Keyboard Swapping----------------------------------*/
  2106. type 'KSWP' {
  2107.      /* The expression below that calculates the number of elements in the
  2108.         array is complicated because of the way that $$ResourceSize works.
  2109.         $$ResourceSize returns the size of the resource.  When derez'ing a
  2110.         resource, the size of the resource is known from the start.  When
  2111.         rez'ing a resource, however, the size starts out at zero and is 
  2112.         incremented each time a field is appended to the resource data.  In
  2113.         other words, while rez'ing, $$ResourceSize rarely returns the final
  2114.         size of the resource.  When rez'ing a KSWP, the array size expression
  2115.         is not evaluated until all of the array elements have been parsed.
  2116.         Since each array element is 4 bytes long (if you add up all the fields),
  2117.         the number of array elements is the size of the resource at that point
  2118.         divided by four.  Since the preprocessor value of "DeRez" is zero when
  2119.         Rez'ing, the expression is equivalent to $$ResourceSize / 4.  When
  2120.         derez'ing a KSWP, the value of $$ResourceSize is constant: always the
  2121.         total size of the resource, in bytes.  Since the resource contains 4
  2122.         bytes of fill at the end (which happens to be the size of an array
  2123.         element), we have to take that in consideration when calculating the
  2124.         size of the array.  Note that the preprocessor value of "DeRez" is one,
  2125.         when derez'ing.
  2126.      */
  2127.      wide array [$$ResourceSize / 4 - DeRez]{
  2128.          hex integer     Roman, Japanese, Chinese, Korean,   /* script code or verb  */
  2129.                          Arabic, Hebrew, Greek,
  2130.                          Rotate = -1, System = -2,
  2131.                          Alternate = -3;
  2132.          unsigned byte;                                      /* virtual key code     */
  2133.          /* Modifiers */
  2134.          fill bit;                                           /* rControlOn,rControlOff*/
  2135.          fill bit;                                           /* rOptionOn,rOptionOff */
  2136.          fill bit;                                           /* rShiftOn,rShiftOff   */
  2137.          boolean     controlOff, controlOn;
  2138.          boolean     optionOff, optionOn;
  2139.          fill bit;                                           /* capsLockOn,capsLockOff*/
  2140.          boolean     shiftOff, shiftOn;
  2141.          boolean     commandOff, commandOn;
  2142.      };
  2143.      fill long;
  2144. };
  2145. æKY mcky
  2146. æC  /*----------------------------mcky • Mouse Tracking-------------------------------------*/
  2147. type 'mcky' {
  2148.      array [8] {
  2149.          unsigned byte;
  2150.      };
  2151. };
  2152. æKY mppc
  2153. æC  /*----------------------------mppc • MPP Configuration Resource-------------------------*/
  2154. type 'mppc' {
  2155.      unsigned hex longint;                                   /* Info passed to drvr  */
  2156.      byte;                                                   /* Override version #   */
  2157.      fill byte;                                              /* Reserved             */
  2158. };
  2159. æKY NFNT
  2160. æC  /*----------------------------NFNT • Font Description-----------------------------------*/
  2161. type 'NFNT' as 'FONT';
  2162.  
  2163. A resource type can be defined that consists of only the character widths and general
  2164. font information—everything but the font’s bit image and location table. If this
  2165. 'FWID' resource type exists, it will be read in whenever QuickDraw doesn’t need to
  2166. draw the text, such as when you call one of the routines CharWidth, HidePen, or
  2167. OpenPicture (which calls HidePen). The FontRec data type described above, minus the
  2168. rowWords, bitImage, and locTable fields, reflects the structure of the 'FWID' resource
  2169. type. The owTLoc field will contain 4, and the fontType field will contain the following
  2170. predefined constant:
  2171.  
  2172. CONST fontWid = $ACB0; {font width data}
  2173.  
  2174. Note:  The extensions to the Font Manager described in the following paragraphs
  2175.        were originally documented in Inside Macintosh, Volume IV.  As such,
  2176.        this information refers to the 128K ROMs and System file version 3.2
  2177.        and later.
  2178.  
  2179. To maintain compatibility with existing applications, the order of the fields in the
  2180. font record remains unchanged; two variable-length arrays are added at the end of the
  2181. record, however, to implement fractional character widths.
  2182.  
  2183.   Number of bytes    Contents
  2184.  
  2185.       m bytes        Optional character-width table of font
  2186.                          m = 2 * (lastChar–firstChar+3)
  2187.       m bytes        Optional image-height table of font
  2188.                          m = 2 * (lastChar–firstChar+3)
  2189.  
  2190. The various sizes of a font are each stored as separate resources. The resource type
  2191. for a font is either 'FONT' or 'NFNT', which is simply the original font record with
  2192. the two additional variable-length arrays added at the end of the record.
  2193.  
  2194. Additional constants have been defined for use in the fontType field; it can now
  2195. contain any of the following values:
  2196.  
  2197. CONST  propFont   = $9000;    {proportional font}
  2198.        prpFntH    = $9001;    { with height table}
  2199.        prpFntW    = $9002;    { with width table}
  2200.        prpFntHW   = $9003;    { with height & width tables}
  2201.  
  2202.        fixedFont  = $B000;    {fixed-width font}
  2203.        fxdFntH    = $B001;    { with height table}
  2204.        fxdFntW    = $B002;    { with width table}
  2205.        fxdFntHW   = $B003;    { with height & width tables}
  2206.  
  2207.        fontWid    = $ACB0;    {font width data:  64K ROM only}
  2208.  
  2209. The low-order two bits of the fontType field tell whether the two optional tables are
  2210. present. If bit 0 is set, there’s an image-height table; if bit 1 is set, there’s a
  2211. character width table.
  2212.  
  2213. The optional character-width table immediately follows the offset/width table; it’s a
  2214. variable-length array specifying the fixed-point character widths for each character
  2215. in the font. Each entry is a word in length. For compactness, a special 16-bit fixed-point
  2216. format is used with an unsigned integer part in the high-order byte and a fractional
  2217. part in the low-order byte.
  2218.  
  2219. •••Refer to Technical Note #30:•••
  2220.  
  2221. The optional image-height table, which speeds the drawing of characters, may also be
  2222. appended after the character-width table; it’s a variable-length array specifying the
  2223. image height of each character in the font. Each entry is a word in length; the
  2224. high-order byte is the offset of the first non-white row in the character; the low-order
  2225. byte is the number of rows that must be drawn. The image height is the height of the
  2226. character image and is less than or equal to the font height; it’s used in conjunction
  2227. with QuickDraw for improved character plotting. Most font resources don’t contain
  2228. this table; it’s typically generated by the Font Manager when the font is swapped
  2229. in.
  2230.  
  2231. Note:  The 64K ROM version of the Resource Manager limits the total space
  2232.        occupied by the bit image, location table, offset/width table, and
  2233.        character-width and image-height tables to 32K bytes. For this reason,
  2234.        the practical limit on the font size of a full font is about 40 points.
  2235.  
  2236. Note:  The extensions to the Font Manager described in the following paragraphs
  2237.        were originally documented in Inside Macintosh, Volume V.  As such,
  2238.        this information refers to the Macintosh SE and Macintosh II ROMs and
  2239.        System file version 4.1 and later.
  2240.  
  2241. Several previously unused bits of the fontType field specify the font depth and other
  2242. related information (the new bits are marked by an asterisk):
  2243.  
  2244.   Bit    Meaning
  2245.  
  2246.   0      Set if there’s an image-height table
  2247.   1      Set if there’s a character-width table
  2248. * 2–3    Font depth (Macintosh II only—must be 0 otherwise)
  2249.   4–6    Reserved (should be 0)
  2250. * 7      Set if font has an 'fctb' resource (Macintosh II
  2251.          only—must be 0 otherwise)
  2252. * 8      Set if a synthetic font (Macintosh II only—must be 0 otherwise)
  2253. * 9      Set if font contains colors other than black (Macintosh II
  2254.          only—must be 0 otherwise)
  2255.   10–11  Reserved (should be 0)
  2256.   12     Reserved (should be 1)
  2257.   13     Set for fixed-width font, clear for proportional font
  2258. * 14     Set if font is not to be expanded (Macintosh II
  2259.          only—must be 0 otherwise)
  2260.   15     Reserved (should be 1)
  2261.  
  2262. Bit 2 and 3 specify the font depth and can contain the following values:
  2263.  
  2264.   Value    Font depth
  2265.     0      1-bit
  2266.     1      2-bit
  2267.     2      4-bit
  2268.     3      8-bit
  2269.  
  2270. The font depth is normally 0, indicating a font intended for a screen one bit deep. 
  2271. If bit 7 is set (and the font is an 'NFNT' resource), a resource of type 'fctb' with
  2272. the same ID as the font can optionally be provided to assign RGB colors to specific
  2273. pixel values.
  2274.  
  2275. Bit 8 is used only by the Font Manager to indicate a synthetic font, created dynamically
  2276. from the available font resources in response to a certain color and screen depth
  2277. combination.
  2278.  
  2279. Bit 9 is set if the font contains other than black.
  2280.  
  2281. Setting bit 14 indicates that the font should not be expanded by the Font Manager to
  2282. match the screen depth; some international fonts, such as kanji, are too large for
  2283. synthetic fonts to be effective or meaningful.
  2284.  
  2285. To accommodate multibit font depths, the owTLoc field has been changed to a long
  2286. word, the nDescent field becoming the high-order word.  (For backward compatibility,
  2287. nDescent is ignored if it’s negative.)
  2288.  
  2289. Note:  The 128K ROM version of the Font Manager limits the strike for a
  2290.        1-bit font to not quite 128K; this limits the largest practical
  2291.        font to about 127 points.  The Macintosh II ROM limits the largest
  2292.        practical font to about 255 points, regardless of the font depth.
  2293.  
  2294. »Font Color Tables
  2295.  
  2296. Note:  The extensions to the Font Manager described in the following paragraphs
  2297.        were originally documented in Inside Macintosh, Volume V.  As such,
  2298.        this information refers to the Macintosh SE and Macintosh II ROMs and
  2299.        System file version 4.1 and later.
  2300.  
  2301. With resources of type 'NFNT', you can specify absolute colors for the font by also
  2302. supplying a color table.  Stored as a resource of type 'fctb' with the same ID as the
  2303. associated 'NFNT' resource, this table is simply the ColorTable record described in
  2304. the Color Manager chapter.
  2305.  
  2306. A 4-bit font depth provides index values for a color table containing 16 entries.  If
  2307. there are index values for which no corresponding entries are found in the associated
  2308. color table, the Font Manager assigns colors based on the current port’s foreground
  2309. and background colors.  If only one entry is missing, it’s assigned the background
  2310. color.  If two entries are missing, the higher index value is assigned the foreground
  2311. color and the lower value is given the background color.  If more than two values are
  2312. missing, the entries are given shades ranging between the foreground and background
  2313. colors.  Figure 19 shows a hypothetical color table for a 2-bit font in which only
  2314. five entries have been supplied in the 'fctb' resource.
  2315.  
  2316. •••Refer to Figure 19.•••
  2317.  
  2318. Figure 19–Hypothetical Font Color Table Entries
  2319.  
  2320. If no color table is provided, the highest and lowest possible index values for any
  2321. given screen depth (with a 2-bit screen depth, for example, values 7 and 0) are
  2322. assigned the foreground and background colors respectively, with the remaining entries
  2323. given shades in between.  This allows gray-scale fonts to be created with as many
  2324. levels of gray as are needed (since each gray is just a color in between a foreground
  2325. of black and a background of white) without needing a color table.
  2326.  
  2327. æKY nrct
  2328. æC  /*----------------------------nrct • Rectangle List-------------------------------------*/
  2329. type 'nrct' {
  2330.      integer = $$CountOf(RectArray);                         /* Number of rectangles */
  2331.      array RectArray {
  2332.          rect;
  2333.      };
  2334. };
  2335.  
  2336. æKY ROv#
  2337. æC  /*----------------------------ROv# • ROM Resource Override------------------------------*/
  2338. type 'ROv#' {
  2339.      unsigned hex integer;                                   /* Version # of ROM     */
  2340.      integer = $$CountOf(typeList) - 1;                      /* Number of resources  */
  2341.      wide array typeList {
  2342.          literal longint;                                    /* Resource type        */
  2343.          integer;                                            /* Resource id          */
  2344.      };
  2345. };
  2346.  
  2347. æKY scrn
  2348. æC  /*----------------------------scrn • Screen Configuration-------------------------------*/
  2349. type 'scrn' {
  2350.      integer = $$CountOf(Device);                            /* Number of displays   */
  2351.      wide array Device {
  2352.          unsigned hex integer;                               /* sRsrc Type           */
  2353.          integer;                                            /* Slot number          */
  2354.          unsigned hex longint;                               /* dCtlDevBase          */
  2355.          integer;                                            /* sRsrcID for mode     */
  2356.          integer = $77FE;                                    /* Flag mask            */
  2357.          Boolean         inactive, active;                   /* Device active flag   */
  2358.          fill bit[3];                                        /* reserved             */
  2359.          Boolean         auxillaryScreen, mainScreen;        /* Main screen flag     */
  2360.          unsigned bitstring[10] = 0;                         /* reserved             */
  2361.          Boolean         monochrome, color;                  /* Device type          */
  2362.          integer;                                            /* Rsrc ID of 'clut'    */
  2363.          integer;                                            /* Rsrc ID of 'gama'    */
  2364.          Rect;                                               /* Device's global rect */
  2365.          integer = $$CountOf(ControlCalls);                  /* # of control calls   */
  2366.          wide array ControlCalls {
  2367.              integer;                                        /* csCode for this call */
  2368.              wstring;                                        /* param block data     */
  2369.              align word;
  2370.              
  2371.          };
  2372.      };
  2373. };
  2374. _______________________________________________________________________________
  2375.  
  2376. »GRAPHICS DEVICE RESOURCES
  2377. _______________________________________________________________________________
  2378.  
  2379. A new resource type has been added to describe the setup of graphics devices:
  2380.  
  2381.     'scrn'    Screen resource type
  2382.  
  2383. The 'scrn' resource contains all the screen configuration information for a multiple
  2384. screen system.  Only the 'scrn' resource with ID = 0 is used by the system.  Normally
  2385. your application won’t have to alter or examine this resource.  It’s created by the
  2386. control panel, and is used by InitGraf.
  2387.  
  2388. The 'scrn' resource consists of a sequence of records, each describing one screen
  2389. device.  In the following description this sequence of records is represented by a
  2390. Pascal FOR loop that repeats once for each screen device.
  2391.  
  2392. 'scrn'     (Screen configuration)
  2393.  
  2394.     ScrnCount         [word]    number of devices in resource
  2395.     FOR i := 1 to ScrnCount DO
  2396.       spDrvrHw        [word]    Slot Manager hardware ID
  2397.       slot            [word]    slot number
  2398.       dCtlDevBase     [long]    dCtlDevBase from DCE
  2399.       mode            [word]    Slot Manager ID for screen’s mode
  2400.       flagMask        [word]    = $77FE
  2401.       flags           [word]    indicates device state
  2402.                                   bit 0  = 0 if monochrome; 1 if color
  2403.                                   bit 11 = 1 if device is main screen
  2404.                                   bit 15 = 1 if device is active
  2405.       colorTable      [word]    resource id of desired 'clut'
  2406.       gammaTable      [word]    resource id of desired 'gama'
  2407.       global Rect     [rect]    device’s global rectangle
  2408.       ctlCount        [word]    number of control calls
  2409.       FOR j := 1 to ctlCount DO
  2410.         csCode        [word]    control code for this call
  2411.         length        [word]    number of bytes in param block
  2412.         param blk     [length]  data to be passed in control call
  2413.       END;
  2414.     END;
  2415.  
  2416. The records in the 'scrn' resource must be in the same order as cards in the slots
  2417. (starting with the lowest slot).  InitGraf scans through the video cards in the
  2418. slots, and compares them with the descriptors in the 'scrn' resource.  If the spDrvrHw,
  2419. slot, and dCtlDevBase fields all match for every screen device in the system, the
  2420. 'scrn' resource is used to initialize the video devices.  Otherwise the 'scrn' resource
  2421. is simply ignored.  Thus if you move a video card, or add or remove one, the 'scrn'
  2422. resource will become invalid.
  2423.  
  2424. SpDrvrHw is a Slot Manager field that identifies the type of hardware on the card.
  2425. (The spDrvrSw field on the card must identify it as an Apple-compatible video driver.)
  2426. Slot is the number of the slot containing the card.  DCtlDevBase is the beginning of
  2427. the device’s address space, taken from the device’s DCE.
  2428.  
  2429. If all video devices match, the rest of the information in the 'scrn' resource is
  2430. used to configure the video devices.  The  mode is actually the slot manager ID
  2431. designating the descriptor for that mode.  This same mode number is passed to the
  2432. video driver to tell it which mode to use.
  2433.  
  2434. The flags bits are used to determine whether the device is active (that is, whether
  2435. it will be used), whether it’s color or monochrome, and whether it’s the main screen
  2436. (the one with the menu bar).  The flagMask simply tells which bits in the flags word
  2437. are used.
  2438.  
  2439. To use the default color table for a device, set the colorTable field to –1. To use
  2440. the default gamma table for a device, set the gammaTable field to –1.
  2441. (Gamma correction is a technique used to select the appropriate intensities of the
  2442. colors sent to a display device. The default gamma table is designed for the Macintosh
  2443. II 13-inch color monitor; other manufacturers’ color monitors might incorporate their
  2444. own gamma tables.)
  2445.  
  2446. The global rect specifies the coordinates of the device relative to other devices. 
  2447. The main device must have topLeft = 0,0. The coordinates of all other devices are
  2448. specified relative to this device.  Devices may not overlap, and must share at least
  2449. part of an edge with another device.  To support future device capabilities, a series
  2450. of control calls may be specified.  These are issued to the driver in the given
  2451. order.
  2452.  
  2453. æKY snd 
  2454. æC  /*----------------------------snd  • Sound----------------------------------------------*/
  2455. type 'snd ' {
  2456.      switch {
  2457.          case FormatOne:
  2458.              key unsigned integer = $0001;
  2459.              unsigned integer = $$CountOf(Synthesizers);
  2460.              wide array Synthesizers {
  2461.                  /* Resource ID of synthesizer/modifer */
  2462.                  integer     generalNoteSynth        = $0001,    // For any Macintosh
  2463.                              generalWaveTableSynth   = $0003,
  2464.                              generalSampledSynth     = $0005,
  2465.                              
  2466.                              sndChipNoteSynth        = $0801,    // For Macintosh with
  2467.                              sndChipWaveTableSynth   = $0803,    // Apple sound chip
  2468.                              sndChipSampledSynth     = $0805,
  2469.                              
  2470.                              plusAndSEnoteSynth      = $1001,    // For Macintosh Plus
  2471.                              plusAndSEwaveTableSynth = $1003,    // and SE
  2472.                              plusAndSEsampledSynth   = $1005;
  2473.                  longint;                                    /* init parameter       */
  2474.              };
  2475.  
  2476.          case FormatTwo:
  2477.              key unsigned integer = $0002;
  2478.              integer     free = 0, keepInMemory = 256+1;     /* Space for refe count */
  2479.      };
  2480.      unsigned integer = $$CountOf(SoundCmnds);
  2481.      wide array SoundCmnds {
  2482.          boolean     noData, hasData;
  2483.          switch {
  2484.              case nullCmd:
  2485.                  key bitstring[15] = 0;
  2486.                  fill word;                                  /* Param 1 = nil        */
  2487.                  fill long;                                  /* Param 2 = nil        */
  2488.              case initCmd:
  2489.                  key bitstring[15] = 1;
  2490.                  fill word;                                  /* Param 1 = nil        */
  2491.                  longint     initChanLeft = $02,             /* Init                 */
  2492.                              initChanRight = $03,
  2493.                              initChan0 = $04, initChan1 = $05,
  2494.                              initChan2 = $06, initChan3 = $07,
  2495.                              initSRate22k = $20, initSRate44k = $30,
  2496.                              initMono = $80, initStereo = $C0;
  2497.              case freeCmd:
  2498.                  key bitstring[15] = 2;
  2499.                  fill word;                                  /* Param 1 = nil        */
  2500.                  fill long;                                  /* Param 2 = nil        */
  2501.              case quietCmd:
  2502.                  key bitstring[15] = 3;
  2503.                  fill word;                                  /* Param 1 = nil        */
  2504.                  fill long;                                  /* Param 2 = nil        */
  2505.              case flushCmd:
  2506.                  key bitstring[15] = 4;
  2507.                  fill word;                                  /* Param 1 = nil        */
  2508.                  fill long;                                  /* Param 2 = nil        */
  2509.              case waitCmd:
  2510.                  key bitstring[15] = 10;
  2511.                  integer     oneSecond = 2000;               /* Duration             */
  2512.                  fill long;                                  /* Param 2 = nil        */
  2513.              case pauseCmd:
  2514.                  key bitstring[15] = 11;
  2515.                  fill word;                                  /* Param 1 = nil        */
  2516.                  fill long;                                  /* Param 2 = nil        */
  2517.              case resumeCmd:
  2518.                  key bitstring[15] = 12;
  2519.                  fill word;                                  /* Param 1 = nil        */
  2520.                  fill long;                                  /* Param 2 = nil        */
  2521.              case callBackCmd:
  2522.                  key bitstring[15] = 13;
  2523.                  integer;                                    /* User-defined         */
  2524.                  longint;                                    /* User-defined         */
  2525.              case syncCmd:
  2526.                  key bitstring[15] = 14;
  2527.                  integer;                                    /* Count                */
  2528.                  longint;                                    /* Identifier           */
  2529.              case emptyCmd:
  2530.                  key bitstring[15] = 15;
  2531.                  fill word;                                  /* Param 1 = nil        */
  2532.                  fill long;                                  /* Param 2 = nil        */
  2533.              case tickleCmd:
  2534.                  key bitstring[15] = 20;
  2535.                  fill word;                                  /* Param 1 = nil        */
  2536.                  fill long;                                  /* Param 2 = nil        */
  2537.              case requestNextCmd:
  2538.                  key bitstring[15] = 21;
  2539.                  integer;                                    /* Count                */
  2540.                  fill long;                                  /* Param 2 = nil        */
  2541.              case howOftenCmd:
  2542.                  key bitstring[15] = 22;
  2543.                  integer;                                    /* Period               */
  2544.                  longint;                                    /* Ptr to modifier stub */
  2545.              case wakeUpCmd:
  2546.                  key bitstring[15] = 23;
  2547.                  integer;                                    /* Period */
  2548.                  longint;                                    /* Ptr to modifier stub */
  2549.              case availableCmd:
  2550.                  key bitstring[15] = 24;
  2551.                  integer;                                    /* Status               */
  2552.                  longint     initChanLeft = $02,             /* Init                 */
  2553.                              initChanRight = $03,
  2554.                              initChan0 = $04, initChan1 = $05,
  2555.                              initChan2 = $06, initChan3 = $07,
  2556.                              initSRate22k = $20, initSRate44k = $30,
  2557.                              initMono = $80, initStereo = $C0;
  2558.              case versionCmd:
  2559.                  key bitstring[15] = 25;
  2560.                  fill word;                                  /* Param 1 = nil        */
  2561.                  longint;                                    /* Version returned     */
  2562.              case noteCmd:
  2563.                  key bitstring[15] = 40;
  2564.                  integer     oneSecond = 2000;               /* Duration             */
  2565.                  longint;                                    /* Amplitude + frequency*/
  2566.              case restCmd:
  2567.                  key bitstring[15] = 41;
  2568.                  integer     oneSecond = 2000;               /* Duration             */
  2569.                  fill long;                                  /* Param 2 = nil        */
  2570.              case freqCmd:
  2571.                  key bitstring[15] = 42;
  2572.                  fill word;                                  /* Param 1 = nil        */
  2573.                  longint;                                    /* Frequency            */
  2574.              case ampCmd:
  2575.                  key bitstring[15] = 43;
  2576.                  integer;                                    /* Amplitude            */
  2577.                  fill long;                                  /* Param 2              */
  2578.              case timbreCmd:
  2579.                  key bitstring[15] = 44;
  2580.                  integer     sineWave, squareWave = 255;     /* Timbre               */
  2581.                  fill long;                                  /* Param 2              */
  2582.              case waveTableCmd:
  2583.                  key bitstring[15] = 60;
  2584.                  unsigned integer;                           /* Length               */
  2585.                  longint;                                    /* Pointer to table     */
  2586.              case phaseCmd:
  2587.                  key bitstring[15] = 61;
  2588.                  integer;                                    /* Shift                */
  2589.                  longint;                                    /* chanPtr              */
  2590.              case soundCmd:
  2591.                  key bitstring[15] = 80;
  2592.                  fill word;                                  /* Param 1 = nil        */
  2593.                  longint;                                    /* Pointer to sound     */
  2594.              case bufferCmd:
  2595.                  key bitstring[15] = 81;
  2596.                  fill word;                                  /* Param 1 = nil        */
  2597.                  longint;                                    /* Pointer to buffer    */
  2598.              case rateCmd:
  2599.                  key bitstring[15] = 82;
  2600.                  fill word;                                  /* Param 1 = nil        */
  2601.                  longint;                                    /* Rate                 */
  2602.              case contBufferCmd:
  2603.                  key bitstring[15] = 83;
  2604.                  fill word;                                  /* Param 1 = nil        */
  2605.                  longint;                                    /* Pointer              */
  2606.          };
  2607.      };
  2608.      array DataTables {
  2609.  DataTable:
  2610.          fill long;                                          /* Pointer to data      */
  2611.  SampleCnt:
  2612.          unsigned longint;                                   /* # of sound samples   */
  2613.          unsigned hex longint
  2614.                  Rate22K = $56ee8ba4;                        /* Sampling rate        */
  2615.          unsigned longint;                                   /* Start of loop        */
  2616.          unsigned longint;                                   /* End of loop          */
  2617.          integer;                                            /* baseNote             */
  2618.          hex string [$$Long(SampleCnt[$$ArrayIndex(DataTables)])];
  2619.      };
  2620. };
  2621. _______________________________________________________________________________
  2622.  
  2623. »SOUND RESOURCES
  2624. _______________________________________________________________________________
  2625.  
  2626. •••Refer to Figure 3.•••
  2627.  
  2628. Figure 3–'snd ' Resource Layout
  2629.  
  2630. Sound resources are intended to be simple, portable, and dynamic solutions for incorporating
  2631. sounds into applications.  Creating these 'snd ' or sound resources, requires some
  2632. understanding of sound synthesis to build a sampled sound header, wave table data,
  2633. and sound commands.  There are two types of
  2634. 'snd ' resources, format 1 and format 2.  Figure 3 compares the structures of both of
  2635. these formats.  These resources should have their purgeable bit set or the application
  2636. will need to call _HPurge after using the 'snd '.
  2637.  
  2638. The format 1 'snd ' was developed for use with the Sound Manager.  A format 1
  2639. 'snd ' may be a sequence of commands describing a melody without specifying a synthesizer
  2640. or modifier and without sound data.  This would allow an application to use the
  2641. _SndPlay routine on any channel to play that melody.  A format 1 'snd ' resource may
  2642. contain a sampled sound or wave table data.
  2643.  
  2644. The format 2 'snd ' was developed for use with HyperCard.  It is intended for use
  2645. with the sampled sound synthesizer only.  A format 2 simply contains a sound command
  2646. that points to a sampled sound header.
  2647.  
  2648. Warning:  HyperCard (versions 1.2.1 and earlier) contain 'snd ' resources
  2649.           incorrectly labeled as format 1.  Refer to Macintosh Technical
  2650.           Note #168.
  2651.  
  2652. Note:  Numbers for 'snd ' resources in the range 0 through 8191 are reserved
  2653.        for Apple.  The 'snd ' resources numbered 1 through 4 are defined to be
  2654.        the standard system beep.
  2655.  
  2656. A sound command contained in a 'snd ' resource with associated sound data is marked
  2657. by setting the high bit of the command.  This changes the param2 field of the command
  2658. to be an offset value from the resource’s beginning, pointing to the location of the
  2659. sound data.  Refer to Figure 5 showing the structure of a sound command.  To calculate
  2660. this offset, use one of the following formulas below.
  2661.  
  2662. For a format 1 'snd ' resource, the offset is calculated as follows:
  2663.  
  2664.   offset = 4 + (number of synth/mods * 6) + (number of cmds * 8)
  2665.  
  2666. For a format 2 'snd ' resource, the offset is calculated as follows:
  2667.  
  2668.   offset = 6 + (number of cmds * 8)
  2669.  
  2670. The first few bytes of the resource contain 'snd ' header information and are a
  2671. different size for either format.  Each synthesizer or modifier specified in a format
  2672. 1 'snd ' requires 6 bytes.  The number of synthesizers and/or modifiers multiplied by
  2673. 6 is added to this offset.  The number of commands multiplied by 8 bytes, the size of
  2674. a sound command, is added to the offset.
  2675.  
  2676. _______________________________________________________________________________
  2677.  
  2678. »Format 1 'snd ' Resource
  2679.  
  2680. Figure 3 shows the fields of a format 1 'snd '  resource.  This resource may also
  2681. contain the actual sound data for the wave table synthesizer or the sampled sound
  2682. synthesizer.  The number of synthesizer and modifiers to be used by this 'snd ' is
  2683. specified in the field number of synth/modifiers.  The synthesizer required to produce
  2684. the sound described in the 'snd ' is specified by the field synth resource ID.  If
  2685. any modifiers are to be installed, their resource IDs follow the first synthesizer. 
  2686. Any synthesizer or modifier specified beyond this first one will be installed into
  2687. the channel as a modifier.
  2688.  
  2689. For every synthesizer and modifier, an init option can be supplied in the field
  2690. immediately following the resource ID for each synthesizer or modifier.  The number
  2691. of commands within the resource is specified in the field number of sound commands. 
  2692. Each sound command follows in the order they should be sent to the channel.  If a
  2693. command such as a bufferCmd is contained in this resource, it needs to specify where
  2694. in the resource the sampled sound header is located.  This is done by setting the
  2695. high bit of the bufferCmd and supplying the offset in param2.  Refer to the section
  2696. “Sound Manager Commands”.
  2697.  
  2698. The 'snd ' resource may be only a sequence of commands describing a melody playable
  2699. by any synthesizer.  This allows the 'snd ' to be used on any channel.  In this case
  2700. the number of synth/modifiers should be 0, and there would not be a synth resource ID
  2701. nor init option in the 'snd '.
  2702.  
  2703. »Example Format 1 'snd '
  2704.  
  2705. The following example resource contains the proper information to create a sound with
  2706. _SndPlay and the sampled sound synthesizer.
  2707.  
  2708.   HEX          Size    Meaning
  2709.  
  2710.   {beginning of snd resource, header information}
  2711.   $0001        WORD    format 1 resource
  2712.   $0001        WORD    number of synth/modifiers to be installed
  2713.  
  2714.   {synth ID to be used}
  2715.   $0005        WORD    resource ID of the first synth/modifier
  2716.   $0000 0000   LONG    initialization option for first synth/modifier
  2717.  
  2718.   $0001        WORD    number of sound commands to follow
  2719.  
  2720.   {first command, 8 bytes in length}
  2721.   $8051        WORD    bufferCmd, high bit on to indicate sound data included
  2722.   $0000        WORD    bufferCmd param1
  2723.   $0000 0014   LONG    bufferCmd param2, offset to sound header (20 bytes)
  2724.  
  2725.   {sampled sound header used in a soundCmd and bufferCmd}
  2726.   $0000 0000   LONG    pointer to data (it follows immediately}
  2727.   $0000 0BB8   LONG    number of samples in bytes (3000 samples)
  2728.   $56EE 8BA3   LONG    sampling rate of this sound (22kHz)
  2729.   $0000 07D0   LONG    starting of the sample’s loop point
  2730.   $0000 0898   LONG    ending of the sample’s loop point
  2731.   $00          BYTE    standard sample encoding
  2732.   $3C          BYTE    baseNote (middle C) at which sample was taken
  2733.  
  2734.   {Packed Array [1..3000] OF Byte, the sampled sound data}
  2735.   $8080 8182 8487 9384 6F68 6D65 727B 8288
  2736.   $918E 8D8F 867E 7C79 6F6D 7170 7079 7F81
  2737.   $898F 8D8B...
  2738.  
  2739. _______________________________________________________________________________
  2740.  
  2741. »Format 2 'snd ' Resource
  2742.  
  2743. The format 2 'snd ' resource is used by the sampled sound synthesizer only and must
  2744. contain a sampled sound.  The _SndPlay routine supports this format by automatically
  2745. opening a channel to the sample sound synthesizer and using the bufferCmd.
  2746.  
  2747. Figure 3 shows the fields of a format 2 'snd '  resource.  The field reference count
  2748. is for the application’s use and is not used by the Sound Manager.  The fields number
  2749. of sound commands and the sound commands are the same as described in a format 1
  2750. resource.  The last field of this 'snd ' is for the sampled sound.  The first command
  2751. should be either a soundCmd or bufferCmd with the pointer bit set in the command to
  2752. specify the location of this sampled sound header.  Any other sound commands in this
  2753. 'snd ' will be ignored by the Sound Manager.
  2754.  
  2755. »Example Format 2 'snd '
  2756.  
  2757. The following example resource contains the proper information to create a sound with
  2758. _SndPlay and the sampled sound synthesizer.
  2759.  
  2760.   HEX          Size    Meaning
  2761.  
  2762.   {beginning of 'snd ' resource, header information}
  2763.   $0002        WORD    format 2 resource
  2764.   $0000        WORD    reference count for application’s use
  2765.   $0001        WORD    number of sound commands to follow
  2766.  
  2767.   {first command, 8 bytes in length}
  2768.   $8051        WORD    bufferCmd, high bit on to indicate sound data included
  2769.   $0000        WORD    bufferCmd param1
  2770.   $0000 0014   LONG    bufferCmd param2, offset to sound header (20 bytes)
  2771.  
  2772.   {sampled sound header used in a soundCmd and bufferCmd}
  2773.   $0000 0000   LONG    pointer to data (it follows immediately}
  2774.   $0000 0BB8   LONG    number of samples in bytes (3000 samples)
  2775.   $56EE 8BA3   LONG    sampling rate of this sound (22kHz)
  2776.   $0000 07D0   LONG    starting of the sample’s loop point
  2777.   $0000 0898   LONG    ending of the sample’s loop point
  2778.   $00          BYTE    standard sample encoding
  2779.   $3C          BYTE    baseNote (middle C) at which sample was taken
  2780.  
  2781.   {Packed Array [1..3000] OF Byte, the sampled sound data}
  2782.   $8080 8182 8487 9384 6F68 6D65 727B 8288
  2783.   $918E 8D8F 867E 7C79 6F6D 7170 7079 7F81
  2784.   $898F 8D8B...
  2785.  
  2786. æKY vers
  2787. æC  /*----------------------------vers • Version--------------------------------------------*/
  2788. type 'vers' {
  2789.      hex byte;                                               /* Major revision in BCD*/
  2790.      hex byte;                                               /* Minor vevision in BCD*/
  2791.      hex byte    development = 0x20,                         /* Release stage        */
  2792.                  alpha = 0x40,
  2793.                  beta = 0x60,
  2794.                  final = 0x80, /* or */ release = 0x80;
  2795.      hex byte;                                               /* Non-final release #  */
  2796.      integer     Country;                                    /* Country code         */
  2797.      pstring;                                                /* Short version number */
  2798.      pstring;                                                /* Long version number  */
  2799. };
  2800. æKY PICT
  2801. æC  /*----------------------------PICT • Quickdraw Picture----------------------------------*/
  2802. type 'PICT' {
  2803.      unsigned integer;                                       /* Length               */
  2804.      rect;                                                   /* Frame                */
  2805.      hex string;                                             /* Data                 */
  2806. };
  2807. /*--------------------------------------------------------------------------------------*/
  2808. type 'PICT' {
  2809.  startOfPict:
  2810.      unsigned integer = (endOfPict - startOfPict) >> 3;
  2811.      Rect;                                   /* Bounds of picture */
  2812.      switch {
  2813.          case VersionOne:
  2814.              key integer = $1101;
  2815.              array OpCodes {
  2816.                  switch {
  2817.                      case NOP:
  2818.                          key byte = $00;
  2819.  
  2820.                      case clipRgn:
  2821.                          key byte = $01;
  2822.  clipRgnStart:           integer = (clipRgnEnd[$$ArrayIndex(OpCodes)] - clipRgnStart[$$ArrayIndex(OpCodes)]) >> 3;
  2823.                          Rect;               /* region's enclosing rect */
  2824.                          hex string [$$Word(clipRgnStart[$$ArrayIndex(OpCodes)]) - 10];
  2825.  clipRgnEnd:
  2826.                      case bkPat:
  2827.                          key byte = $02;
  2828.                          hex string [8];
  2829.                      
  2830.                      case txFont:
  2831.                          key byte = $03;
  2832.                          integer;            /* font */
  2833.                      
  2834.                      case txFace:
  2835.                          key byte = $04;
  2836.                          unsigned hex byte;  /* text face */
  2837.                      
  2838.                      case txMode:
  2839.                          key byte = $05;
  2840.                          integer     srcCopy, srcOr, srcXor, srcBic, /* mode */
  2841.                                      notSrcCopy, notSrcOr, notSrcXor,
  2842.                                      notSrcBic, patCopy, patOr, patXor,
  2843.                                      patBic, notPatCopy, notPatOr, notPatBic;
  2844.                      
  2845.                      case spExtra:
  2846.                          key byte = $06;
  2847.                          unsigned hex longint;
  2848.                      
  2849.                      case pnSize:
  2850.                          key byte = $07;
  2851.                          Point;
  2852.                      
  2853.                      case pnMode:
  2854.                          key byte = $08;
  2855.                          unsigned hex integer;
  2856.                      
  2857.                      case pnPat:
  2858.                          key byte = $09;
  2859.                          hex string [8];
  2860.                      
  2861.                      case thePat:
  2862.                          key byte = $0A;
  2863.                          hex string [8];
  2864.                      
  2865.                      case ovSize:
  2866.                          key byte = $0B;
  2867.                          Point;
  2868.                      
  2869.                      case origin:
  2870.                          key byte = $0C;
  2871.                          integer;            /* dh */
  2872.                          integer;            /* dv */
  2873.                      
  2874.                      case txSize:
  2875.                          key byte = $0D;
  2876.                          integer;
  2877.                      
  2878.                      case fgColor:
  2879.                          key byte = $0E;
  2880.                          longint;
  2881.                      
  2882.                      case bkColor:
  2883.                          key byte = $0F;
  2884.                          longint;
  2885.                      
  2886.                      case txRatio:
  2887.                          key byte = $10;
  2888.                          Point;              /* numer */
  2889.                          Point;              /* denom */
  2890.                      
  2891.                      case picVersion:
  2892.                          key byte = $11;
  2893.                          byte;
  2894.                      
  2895.                      case line:
  2896.                          key byte = $20;
  2897.                          Point;              /* pnLoc */
  2898.                          Point;              /* newPt */
  2899.                      
  2900.                      case lineFrom:
  2901.                          key byte = $21;
  2902.                          Point;              /* newPt */
  2903.                      
  2904.                      case shortLine:
  2905.                          key byte = $22;
  2906.                          Point;              /* pnLoc */
  2907.                          byte;               /* dh */
  2908.                          byte;               /* dv */
  2909.                      
  2910.                      case shortLineFrom:
  2911.                          key byte = $23;
  2912.                          byte;               /* dh */
  2913.                          byte;               /* dv */
  2914.                      
  2915.                      case longText:
  2916.                          key byte = $28;
  2917.                          Point;              /* txLoc */
  2918.                          pstring;
  2919.                      
  2920.                      case dhText:
  2921.                          key byte = $29;
  2922.                          byte;               /* dh */
  2923.                          pstring;
  2924.                          
  2925.                      case dvText:
  2926.                          key byte = $2A;
  2927.                          byte;               /* dvh */
  2928.                          pstring;
  2929.                          
  2930.                      case dhdvText:
  2931.                          key byte = $2B;
  2932.                          byte;               /* dh */
  2933.                          byte;               /* dv */
  2934.                          pstring;
  2935.                          
  2936.                      case frameRect:
  2937.                          key byte = $30;
  2938.                          Rect;
  2939.                          
  2940.                      case paintRect:
  2941.                          key byte = $31;
  2942.                          Rect;
  2943.                          
  2944.                      case eraseRect:
  2945.                          key byte = $32;
  2946.                          Rect;
  2947.                          
  2948.                      case invertRect:
  2949.                          key byte = $33;
  2950.                          Rect;
  2951.                          
  2952.                      case fillRect:
  2953.                          key byte = $34;
  2954.                          Rect;
  2955.                      
  2956.                      case frameSameRect:
  2957.                          key byte = $38;
  2958.                          
  2959.                      case paintSameRect:
  2960.                          key byte = $39;
  2961.                          
  2962.                      case eraseSameRect:
  2963.                          key byte = $3A;
  2964.                          
  2965.                      case invertSameRect:
  2966.                          key byte = $3B;
  2967.                          
  2968.                      case fillSameRect:
  2969.                          key byte = $3C;
  2970.                      
  2971.                      case frameRRect:
  2972.                          key byte = $40;
  2973.                          Rect;
  2974.                          
  2975.                      case paintRRect:
  2976.                          key byte = $41;
  2977.                          Rect;
  2978.                          
  2979.                      case eraseRRect:
  2980.                          key byte = $42;
  2981.                          Rect;
  2982.                          
  2983.                      case invertRRect:
  2984.                          key byte = $43;
  2985.                          Rect;
  2986.                          
  2987.                      case fillRRect:
  2988.                          key byte = $44;
  2989.                          Rect;
  2990.                          
  2991.                      case frameSameRRect:
  2992.                          key byte = $48;
  2993.                          
  2994.                      case paintSameRRect:
  2995.                          key byte = $49;
  2996.                          
  2997.                      case eraseSameRRect:
  2998.                          key byte = $4A;
  2999.                          
  3000.                      case invertSameRRect:
  3001.                          key byte = $4B;
  3002.                          
  3003.                      case fillSameRRect:
  3004.                          key byte = $4C;
  3005.                          
  3006.                      case frameOval:
  3007.                          key byte = $50;
  3008.                          Rect;
  3009.                          
  3010.                      case paintOval:
  3011.                          key byte = $51;
  3012.                          Rect;
  3013.                          
  3014.                      case eraseOval:
  3015.                          key byte = $52;
  3016.                          Rect;
  3017.                          
  3018.                      case invertOval:
  3019.                          key byte = $53;
  3020.                          Rect;
  3021.                          
  3022.                      case fillOval:
  3023.                          key byte = $54;
  3024.                          Rect;
  3025.                      
  3026.                      case frameSameOval:
  3027.                          key byte = $58;
  3028.                          
  3029.                      case paintSameOval:
  3030.                          key byte = $59;
  3031.                          
  3032.                      case eraseSameOval:
  3033.                          key byte = $5A;
  3034.                          
  3035.                      case invertSameOval:
  3036.                          key byte = $5B;
  3037.                          
  3038.                      case fillSameOval:
  3039.                          key byte = $5C;
  3040.                      
  3041.                      case frameArc:
  3042.                          key byte = $60;
  3043.                          Rect;
  3044.                          integer;                /* startAngle */
  3045.                          integer;                /* arcAngle */
  3046.                      
  3047.                      case paintArc:
  3048.                          key byte = $61;
  3049.                          Rect;
  3050.                          integer;                /* startAngle */
  3051.                          integer;                /* arcAngle */
  3052.                      
  3053.                      case eraseArc:
  3054.                          key byte = $62;
  3055.                          Rect;
  3056.                          integer;                /* startAngle */
  3057.                          integer;                /* arcAngle */
  3058.                      
  3059.                      case invertArc:
  3060.                          key byte = $63;
  3061.                          Rect;
  3062.                          integer;                /* startAngle */
  3063.                          integer;                /* arcAngle */
  3064.                      
  3065.                      case fillArc:
  3066.                          key byte = $64;
  3067.                          Rect;
  3068.                          integer;                /* startAngle */
  3069.                          integer;                /* arcAngle */
  3070.                      
  3071.                      case frameSameArc:
  3072.                          key byte = $68;
  3073.                          integer;                /* startAngle */
  3074.                          integer;                /* arcAngle */
  3075.  
  3076.                      case paintSameArc:
  3077.                          key byte = $69;
  3078.                          integer;                /* startAngle */
  3079.                          integer;                /* arcAngle */
  3080.  
  3081.                      case eraseSameArc:
  3082.                          key byte = $6A;
  3083.                          integer;                /* startAngle */
  3084.                          integer;                /* arcAngle */
  3085.  
  3086.                      case invertSameArc:
  3087.                          key byte = $6B;
  3088.                          integer;                /* startAngle */
  3089.                          integer;                /* arcAngle */
  3090.  
  3091.                      case fillSameArc:
  3092.                          key byte = $6C;
  3093.                          integer;                /* startAngle */
  3094.                          integer;                /* arcAngle */
  3095.                      
  3096.                      case framePoly:
  3097.                          key byte = $70;
  3098.                          integer = $$CountOf(framePoly) * 4 + 10;
  3099.                          Rect;                   /* enclosing rectangle */
  3100.                          array framePoly {
  3101.                              Point;
  3102.                          };
  3103.                      
  3104.                      case paintPoly:
  3105.                          key byte = $71;
  3106.                          integer = $$CountOf(framePoly) * 4 + 10;
  3107.                          Rect;                   /* enclosing rectangle */
  3108.                          array framePoly {
  3109.                              Point;
  3110.                          };
  3111.                      
  3112.                      case erasePoly:
  3113.                          key byte = $72;
  3114.                          integer = $$CountOf(framePoly) * 4 + 10;
  3115.                          Rect;                   /* enclosing rectangle */
  3116.                          array framePoly {
  3117.                              Point;
  3118.                          };
  3119.                      
  3120.                      case invertPoly:
  3121.                          key byte = $73;
  3122.                          integer = $$CountOf(framePoly) * 4 + 10;
  3123.                          Rect;                   /* enclosing rectangle */
  3124.                          array framePoly {
  3125.                              Point;
  3126.                          };
  3127.                      
  3128.                      case fillPoly:
  3129.                          key byte = $74;
  3130.                          integer = $$CountOf(framePoly) * 4 + 10;
  3131.                          Rect;                   /* enclosing rectangle */
  3132.                          array framePoly {
  3133.                              Point;
  3134.                          };
  3135.                      
  3136.                      case frameSamePoly:
  3137.                          key byte = $78;
  3138.  
  3139.                      case paintSamePoly:
  3140.                          key byte = $79;
  3141.  
  3142.                      case eraseSamePoly:
  3143.                          key byte = $7A;
  3144.  
  3145.                      case invertSamePoly:
  3146.                          key byte = $7B;
  3147.  
  3148.                      case fillSamePoly:
  3149.                          key byte = $7C;
  3150.  
  3151.                      case frameRgn:
  3152.                          key byte = $80;
  3153.  frameRgnStart:          integer = (frameRgnEnd[$$ArrayIndex(OpCodes)] - frameRgnStart[$$ArrayIndex(OpCodes)]) >> 3;
  3154.                          Rect;               /* region's enclosing rect */
  3155.                          hex string [$$Word(frameRgnStart[$$ArrayIndex(OpCodes)]) - 10];
  3156.  frameRgnEnd:
  3157.                      case paintRgn:
  3158.                          key byte = $81;
  3159.  paintRgnStart:          integer = (paintRgnEnd[$$ArrayIndex(OpCodes)] - paintRgnStart[$$ArrayIndex(OpCodes)]) >> 3;
  3160.                          Rect;               /* region's enclosing rect */
  3161.                          hex string [$$Word(paintRgnStart[$$ArrayIndex(OpCodes)]) - 10];
  3162.  paintRgnEnd:
  3163.                      case eraseRgn:
  3164.                          key byte = $82;
  3165.  eraseRgnStart:          integer = (eraseRgnEnd[$$ArrayIndex(OpCodes)] - eraseRgnStart[$$ArrayIndex(OpCodes)]) >> 3;
  3166.                          Rect;               /* region's enclosing rect */
  3167.                          hex string [$$Word(eraseRgnStart[$$ArrayIndex(OpCodes)]) - 10];
  3168.  eraseRgnEnd:
  3169.                      case invertRgn:
  3170.                          key byte = $83;
  3171.  invertRgnStart:         integer = (invertRgnEnd[$$ArrayIndex(OpCodes)] - invertRgnStart[$$ArrayIndex(OpCodes)]) >> 3;
  3172.                          Rect;               /* region's enclosing rect */
  3173.                          hex string [$$Word(invertRgnStart[$$ArrayIndex(OpCodes)]) - 10];
  3174.  invertRgnEnd:
  3175.                      case fillRgn:
  3176.                          key byte = $84;
  3177.  fillRgnStart:           integer = (fillRgnEnd[$$ArrayIndex(OpCodes)] - fillRgnStart[$$ArrayIndex(OpCodes)]) >> 3;
  3178.                          Rect;               /* region's enclosing rect */
  3179.                          hex string [$$Word(fillRgnStart[$$ArrayIndex(OpCodes)]) - 10];
  3180.  fillRgnEnd:
  3181.                      case frameSameRgn:
  3182.                          key byte = $88;
  3183.  
  3184.                      case paintSameRgn:
  3185.                          key byte = $89;
  3186.  
  3187.                      case eraseSameRgn:
  3188.                          key byte = $8A;
  3189.  
  3190.                      case invertSameRgn:
  3191.                          key byte = $8B;
  3192.  
  3193.                      case fillSameRgn:
  3194.                          key byte = $8C;
  3195.  
  3196.                      case bitsRect:
  3197.                          key byte = $90;
  3198.  BitsRectRowBytes:       integer;                    /* row bytes */
  3199.  BitsRectBounds:         Rect;                       /* bounds */
  3200.                          Rect;                       /* srcRect */
  3201.                          Rect;                       /* destRect */
  3202.                          integer     srcCopy, srcOr, srcXor, srcBic, /* mode */
  3203.                                      notSrcCopy, notSrcOr, notSrcXor,
  3204.                                      notSrcBic, patCopy, patOr, patXor,
  3205.                                      patBic, notPatCopy, notPatOr, notPatBic;
  3206.                          hex string [($$BitField(BitsRectBounds[$$ArrayIndex(OpCodes)],32,16)
  3207.                                      - $$BitField(BitsRectBounds[$$ArrayIndex(OpCodes)],0,16))
  3208.                                      * $$Word(BitsRectRowBytes[$$ArrayIndex(OpCodes)])];
  3209.  
  3210.                      case bitsRgn:
  3211.                          key byte = $91;
  3212.  BitsRgnRowBytes:        integer;                    /* row bytes */
  3213.  BitsRgnBounds:          Rect;                       /* bounds */
  3214.                          Rect;                       /* srcRect */
  3215.                          Rect;                       /* destRect */
  3216.                          integer     srcCopy, srcOr, srcXor, srcBic, /* mode */
  3217.                                      notSrcCopy, notSrcOr, notSrcXor,
  3218.                                      notSrcBic, patCopy, patOr, patXor,
  3219.                                      patBic, notPatCopy, notPatOr, notPatBic;
  3220.  bitsRgnStart:           integer = (bitsRgnEnd[$$ArrayIndex(OpCodes)] - bitsRgnStart[$$ArrayIndex(OpCodes)]) >> 3;
  3221.                          Rect;               /* region's enclosing rect */
  3222.                          hex string [$$Word(bitsRgnStart[$$ArrayIndex(OpCodes)]) - 10];
  3223.  bitsRgnEnd:
  3224.                          hex string [($$BitField(BitsRgnBounds[$$ArrayIndex(OpCodes)],32,16)
  3225.                                      - $$BitField(BitsRgnBounds[$$ArrayIndex(OpCodes)],0,16))
  3226.                                      * $$Word(BitsRgnRowBytes[$$ArrayIndex(OpCodes)])];
  3227.  
  3228.                      case packBitsRect:
  3229.                          key byte = $98;
  3230.  PackBitsRectRowBytes:   integer;                    /* row bytes */
  3231.  PackBitsRectBounds:     Rect;                       /* bounds */
  3232.                          Rect;                       /* srcRect */
  3233.                          Rect;                       /* destRect */
  3234.                          integer     srcCopy, srcOr, srcXor, srcBic, /* mode */
  3235.                                      notSrcCopy, notSrcOr, notSrcXor,
  3236.                                      notSrcBic, patCopy, patOr, patXor,
  3237.                                      patBic, notPatCopy, notPatOr, notPatBic;
  3238.  PackBitsBits:           hex string [$$PackedSize(PackBitsBits[$$ArrayIndex(OpCodes)],
  3239.                                      $$Word(PackBitsRectRowBytes[$$ArrayIndex(OpCodes)]),
  3240.                                      ($$BitField(PackBitsRectBounds[$$ArrayIndex(OpCodes)],32,16)
  3241.                                      - $$BitField(PackBitsRectBounds[$$ArrayIndex(OpCodes)],0,16)))];
  3242.  
  3243.                      case packBitsRgn:
  3244.                          key byte = $99;
  3245.  packBitsRgnRowBytes:    integer;                    /* row bytes */
  3246.  packBitsRgnBounds:      Rect;                       /* bounds */
  3247.                          Rect;                       /* srcRect */
  3248.                          Rect;                       /* destRect */
  3249.                          integer     srcCopy, srcOr, srcXor, srcBic, /* mode */
  3250.                                      notSrcCopy, notSrcOr, notSrcXor,
  3251.                                      notSrcBic, patCopy, patOr, patXor,
  3252.                                      patBic, notPatCopy, notPatOr, notPatBic;
  3253.  packBitsRgnStart:       integer = (packBitsRgnEnd[$$ArrayIndex(OpCodes)] - packBitsRgnStart[$$ArrayIndex(OpCodes)]) >> 3;
  3254.                          Rect;               /* region's enclosing rect */
  3255.                          hex string [$$Word(packBitsRgnStart[$$ArrayIndex(OpCodes)]) - 10];
  3256.  packBitsRgnEnd:         hex string [$$PackedSize(packBitsRgnEnd[$$ArrayIndex(OpCodes)],
  3257.                                      $$Word(packBitsRgnRowBytes[$$ArrayIndex(OpCodes)]),
  3258.                                      ($$BitField(packBitsRgnBounds[$$ArrayIndex(OpCodes)],32,16)
  3259.                                      - $$BitField(packBitsRgnBounds[$$ArrayIndex(OpCodes)],0,16)))];
  3260.  
  3261.                      case shortComment:
  3262.                          key byte = $A0;
  3263.                          integer;            /* kind */
  3264.  
  3265.                      case longComment:
  3266.                          key byte = $A1;
  3267.                          integer;            /* kind */
  3268.  longCommentStart:       integer = (longCommentEnd[$$ArrayIndex(OpCodes)] - longCommentStart[$$ArrayIndex(OpCodes)] - 16) >> 3;
  3269.                          hex string [$$Word(longCommentStart[$$ArrayIndex(OpCodes)])];
  3270.  longCommentEnd:
  3271.                  };
  3272.              };
  3273.              byte = $FF;     /* End of picture */
  3274.              
  3275.          case VersionTwo:
  3276.              key longint = $001102ff;        /* Version op + version */
  3277.              array OpCodes {
  3278.                  switch {
  3279.                      case Clip:
  3280.                          key integer = $0001;
  3281.  ClipStart:              integer = (ClipEnd[$$ArrayIndex(OpCodes)] - ClipStart[$$ArrayIndex(OpCodes)]) >> 3;
  3282.                          Rect;               /* region's enclosing rect */
  3283.                          hex string [$$Word(ClipStart[$$ArrayIndex(OpCodes)]) - 10];
  3284.  ClipEnd:
  3285.                      case BkPat:
  3286.                          key integer = $0002;
  3287.                          hex string [8];
  3288.                      
  3289.                      case TxFont:
  3290.                          key integer = $0003;
  3291.                          integer;            /* font */
  3292.                      
  3293.                      case TxFace:
  3294.                          key integer = $0004;
  3295.                          unsigned hex byte;  /* text face */
  3296.                      
  3297.                      case TxMode:
  3298.                          key integer = $0005;
  3299.                          integer     srcCopy, srcOr, srcXor, srcBic, /* mode */
  3300.                                      notSrcCopy, notSrcOr, notSrcXor,
  3301.                                      notSrcBic, patCopy, patOr, patXor,
  3302.                                      patBic, notPatCopy, notPatOr, notPatBic;
  3303.                      
  3304.                      case SpExtra:
  3305.                          key integer = $0006;
  3306.                          unsigned hex longint;
  3307.                      
  3308.                      case PnSize:
  3309.                          key integer = $0007;
  3310.                          Point;
  3311.                      
  3312.                      case PnMode:
  3313.                          key integer = $0008;
  3314.                          unsigned hex integer;
  3315.                      
  3316.                      case PnPat:
  3317.                          key integer = $0009;
  3318.                          hex string [8];
  3319.                      
  3320.                      case FillPat:
  3321.                          key integer = $000A;
  3322.                          hex string [8];
  3323.                      
  3324.                      case OvSize:
  3325.                          key integer = $000B;
  3326.                          Point;
  3327.                      
  3328.                      case Origin:
  3329.                          key integer = $000C;
  3330.                          integer;            /* dh */
  3331.                          integer;            /* dv */
  3332.                      
  3333.                      case TxSize:
  3334.                          key integer = $000D;
  3335.                          integer;
  3336.                      
  3337.                      case FgColor:
  3338.                          key integer = $000E;
  3339.                          longint;
  3340.                      
  3341.                      case BkColor:
  3342.                          key integer = $000F;
  3343.                          longint;
  3344.                      
  3345.                      case TxRatio:
  3346.                          key integer = $0010;
  3347.                          Point;              /* numer */
  3348.                          Point;              /* denom */
  3349.                      
  3350.                      case Version:
  3351.                          key integer = $0011;
  3352.                          byte;
  3353.  
  3354.                      case BkPixPat:
  3355.                          key integer = $0012;
  3356.                          switch {
  3357.                              case newPattern:
  3358.                                  key integer = 1;
  3359.                                  hex string [8];         /* old-style pattern    */
  3360.                                  unsigned bitstring[1] = 1;                              /* New pixMap flag      */
  3361.                                  unsigned bitstring[2] = 0;                              /* Must be 0            */
  3362.  BkPixPatpMapRowBytes:           unsigned bitstring[13];                                 /* Offset to next row   */
  3363.  BkPixPatBounds:                 rect;                                                   /* Bitmap bounds        */
  3364.                                  integer;                                                /* pixMap vers number   */
  3365.                                  integer unpacked;                                       /* Packing format       */
  3366.                                  unsigned longint;                                       /* Size of pixel data   */
  3367.                                  unsigned hex longint;                                   /* h. resolution (ppi) (fixed) */
  3368.                                  unsigned hex longint;                                   /* v. resolution (ppi) (fixed) */
  3369.                                  integer         chunky, chunkyPlanar, planar;           /* Pixel storage format */
  3370.                                  integer;                                                /* # bits in pixel      */
  3371.                                  integer;                                                /* # components in pixel*/
  3372.                                  integer;                                                /* # bits per field     */
  3373.                                  unsigned longint;                                       /* Offset to next plane */
  3374.                                  unsigned longint;                                       /* Offset to color table*/
  3375.                                  fill long;                                              /* Reserved             */
  3376.                                  /* Color Table */
  3377.                                  unsigned hex longint;                                   /* ctSeed               */
  3378.                                  integer;                                                /* ctFlags              */
  3379.                                  integer = $$Countof(ColorSpec) - 1;                     /* ctSize               */
  3380.                                  wide array ColorSpec {
  3381.                                          integer;                                        /* value                */
  3382.                                          unsigned integer;                               /* RGB: red             */
  3383.                                          unsigned integer;                               /*      green           */
  3384.                                          unsigned integer;                               /*      blue            */
  3385.                                  };
  3386.                                  /* If rowBytes < 8 then data is unpacked,
  3387.                                     if >= 8, then data is packed */
  3388.  BkPixPatBits:                   hex string [($$BitField(BkPixPatpMapRowBytes[$$ArrayIndex(OpCodes)],0,13) < 8) *
  3389.                                              $$BitField(BkPixPatpMapRowBytes[$$ArrayIndex(OpCodes)],0,13) +
  3390.                                              ($$BitField(BkPixPatpMapRowBytes[$$ArrayIndex(OpCodes)],0,13) >= 8) *
  3391.                                              $$PackedSize(BkPixPatBits[$$ArrayIndex(OpCodes)],
  3392.                                              $$BitField(BkPixPatpMapRowBytes[$$ArrayIndex(OpCodes)],0,13),
  3393.                                              ($$BitField(BkPixPatBounds[$$ArrayIndex(OpCodes)],32,16)
  3394.                                              - $$BitField(BkPixPatBounds[$$ArrayIndex(OpCodes)],0,16)))];
  3395.                              
  3396.                              case ditherPattern:
  3397.                                  key integer = 2;
  3398.                                  hex string [8];         /* old-style pattern    */
  3399.                                  unsigned integer;       /* RGB: red             */
  3400.                                  unsigned integer;       /*      green           */
  3401.                                  unsigned integer;       /*      blue            */
  3402.                          };
  3403.  
  3404.                      case PnPixPat:
  3405.                          key integer = $0013;
  3406.                          switch {
  3407.                              case newPattern:
  3408.                                  key integer = 1;
  3409.                                  hex string [8];         /* old-style pattern    */
  3410.                                  unsigned bitstring[1] = 1;                              /* New pixMap flag      */
  3411.                                  unsigned bitstring[2] = 0;                              /* Must be 0            */
  3412.  PnPixPatpMapRowBytes:           unsigned bitstring[13];                                 /* Offset to next row   */
  3413.  PnPixPatBounds:                 rect;                                                   /* Bitmap bounds        */
  3414.                                  integer;                                                /* pixMap vers number   */
  3415.                                  integer unpacked;                                       /* Packing format       */
  3416.                                  unsigned longint;                                       /* Size of pixel data   */
  3417.                                  unsigned hex longint;                                   /* h. resolution (ppi) (fixed) */
  3418.                                  unsigned hex longint;                                   /* v. resolution (ppi) (fixed) */
  3419.                                  integer         chunky, chunkyPlanar, planar;           /* Pixel storage format */
  3420.                                  integer;                                                /* # bits in pixel      */
  3421.                                  integer;                                                /* # components in pixel*/
  3422.                                  integer;                                                /* # bits per field     */
  3423.                                  unsigned longint;                                       /* Offset to next plane */
  3424.                                  unsigned longint;                                       /* Offset to color table*/
  3425.                                  fill long;                                              /* Reserved             */
  3426.                                  /* Color Table */
  3427.                                  unsigned hex longint;                                   /* ctSeed               */
  3428.                                  integer;                                                /* ctFlags              */
  3429.                                  integer = $$Countof(ColorSpec) - 1;                     /* ctSize               */
  3430.                                  wide array ColorSpec {
  3431.                                          integer;                                        /* value                */
  3432.                                          unsigned integer;                               /* RGB: red             */
  3433.                                          unsigned integer;                               /*      green           */
  3434.                                          unsigned integer;                               /*      blue            */
  3435.                                  };
  3436.                                  /* If rowBytes < 8 then data is unpacked,
  3437.                                     if >= 8, then data is packed */
  3438.  PnPixPatBits:                   hex string [($$BitField(PnPixPatpMapRowBytes[$$ArrayIndex(OpCodes)],0,13) < 8) *
  3439.                                              $$BitField(PnPixPatpMapRowBytes[$$ArrayIndex(OpCodes)],0,13) +
  3440.                                              ($$BitField(PnPixPatpMapRowBytes[$$ArrayIndex(OpCodes)],0,13) >= 8) *
  3441.                                              $$PackedSize(PnPixPatBits[$$ArrayIndex(OpCodes)],
  3442.                                              $$BitField(PnPixPatpMapRowBytes[$$ArrayIndex(OpCodes)],0,13),
  3443.                                              ($$BitField(PnPixPatBounds[$$ArrayIndex(OpCodes)],32,16)
  3444.                                              - $$BitField(PnPixPatBounds[$$ArrayIndex(OpCodes)],0,16)))];
  3445.                              
  3446.                              case ditherPattern:
  3447.                                  key integer = 2;
  3448.                                  hex string [8];         /* old-style pattern    */
  3449.                                  unsigned integer;       /* RGB: red             */
  3450.                                  unsigned integer;       /*      green           */
  3451.                                  unsigned integer;       /*      blue            */
  3452.                          };
  3453.  
  3454.                      case FillPixPat:
  3455.                          key integer = $0014;
  3456.                          switch {
  3457.                              case newPattern:
  3458.                                  key integer = 1;
  3459.                                  hex string [8];         /* old-style pattern    */
  3460.                                  unsigned bitstring[1] = 1;                              /* New pixMap flag      */
  3461.                                  unsigned bitstring[2] = 0;                              /* Must be 0            */
  3462.  FillPixPatpMapRowBytes:         unsigned bitstring[13];                                 /* Offset to next row   */
  3463.  FillPixPatBounds:                   rect;                                                   /* Bitmap bounds        */
  3464.                                  integer;                                                /* pixMap vers number   */
  3465.                                  integer unpacked;                                       /* Packing format       */
  3466.                                  unsigned longint;                                       /* Size of pixel data   */
  3467.                                  unsigned hex longint;                                   /* h. resolution (ppi) (fixed) */
  3468.                                  unsigned hex longint;                                   /* v. resolution (ppi) (fixed) */
  3469.                                  integer         chunky, chunkyPlanar, planar;           /* Pixel storage format */
  3470.                                  integer;                                                /* # bits in pixel      */
  3471.                                  integer;                                                /* # components in pixel*/
  3472.                                  integer;                                                /* # bits per field     */
  3473.                                  unsigned longint;                                       /* Offset to next plane */
  3474.                                  unsigned longint;                                       /* Offset to color table*/
  3475.                                  fill long;                                              /* Reserved             */
  3476.                                  /* Color Table */
  3477.                                  unsigned hex longint;                                   /* ctSeed               */
  3478.                                  integer;                                                /* ctFlags              */
  3479.                                  integer = $$Countof(ColorSpec) - 1;                     /* ctSize               */
  3480.                                  wide array ColorSpec {
  3481.                                          integer;                                        /* value                */
  3482.                                          unsigned integer;                               /* RGB: red             */
  3483.                                          unsigned integer;                               /*      green           */
  3484.                                          unsigned integer;                               /*      blue            */
  3485.                                  };
  3486.                                  /* If rowBytes < 8 then data is unpacked,
  3487.                                     if >= 8, then data is packed */
  3488.  FillPixPatBits:                 hex string [($$BitField(FillPixPatpMapRowBytes[$$ArrayIndex(OpCodes)],0,13) < 8) *
  3489.                                              $$BitField(FillPixPatpMapRowBytes[$$ArrayIndex(OpCodes)],0,13) +
  3490.                                              ($$BitField(FillPixPatpMapRowBytes[$$ArrayIndex(OpCodes)],0,13) >= 8) *
  3491.                                              $$PackedSize(FillPixPatBits[$$ArrayIndex(OpCodes)],
  3492.                                              $$BitField(FillPixPatpMapRowBytes[$$ArrayIndex(OpCodes)],0,13),
  3493.                                              ($$BitField(FillPixPatBounds[$$ArrayIndex(OpCodes)],32,16)
  3494.                                              - $$BitField(FillPixPatBounds[$$ArrayIndex(OpCodes)],0,16)))];
  3495.                              
  3496.                              case ditherPattern:
  3497.                                  key integer = 2;
  3498.                                  hex string [8];         /* old-style pattern    */
  3499.                                  unsigned integer;       /* RGB: red             */
  3500.                                  unsigned integer;       /*      green           */
  3501.                                  unsigned integer;       /*      blue            */
  3502.                          };
  3503.                      
  3504.                      case PnLocHFrac:
  3505.                          key integer = $0015;
  3506.                          unsigned hex integer;
  3507.                      
  3508.                      case ChExtra:
  3509.                          key integer = $0016;
  3510.                          integer;                        /* extra for each character */
  3511.                      
  3512.                      case AppleReserved0017:
  3513.                          key integer = $0017;
  3514.                          
  3515.                      case AppleReserved0018:
  3516.                          key integer = $0018;
  3517.                          
  3518.                      case AppleReserved0019:
  3519.                          key integer = $0019;
  3520.                      
  3521.                      case RGBFgCol:
  3522.                          key integer = $001A;
  3523.                          unsigned integer;       /* RGB: red             */
  3524.                          unsigned integer;       /*      green           */
  3525.                          unsigned integer;       /*      blue            */
  3526.                          
  3527.                      case RGBBkCol:
  3528.                          key integer = $001B;
  3529.                          unsigned integer;       /* RGB: red             */
  3530.                          unsigned integer;       /*      green           */
  3531.                          unsigned integer;       /*      blue            */
  3532.                          
  3533.                      case HiliteMode:
  3534.                          key integer = $001C;
  3535.                      
  3536.                      case HiliteColor:
  3537.                          key integer = $001D;
  3538.                          unsigned integer;       /* RGB: red             */
  3539.                          unsigned integer;       /*      green           */
  3540.                          unsigned integer;       /*      blue            */
  3541.                      
  3542.                      case DefHilite:
  3543.                          key integer = $001E;
  3544.                      
  3545.                      case OpColor:
  3546.                          key integer = $001F;
  3547.                          unsigned integer;       /* RGB: red             */
  3548.                          unsigned integer;       /*      green           */
  3549.                          unsigned integer;       /*      blue            */
  3550.                      
  3551.                      case Line:
  3552.                          key integer = $0020;
  3553.                          Point;                  /* pnLoc */
  3554.                          Point;                  /* newPt */
  3555.                          
  3556.                      case LineFrom:
  3557.                          key integer = $0021;
  3558.                          Point;                  /* newPt */
  3559.                      
  3560.                      case ShortLine:
  3561.                          key integer = $0022;
  3562.                          Point;                  /* pnLoc */
  3563.                          byte;                   /* dh */
  3564.                          byte;                   /* dv */
  3565.                      
  3566.                      case ShortLineFrom:
  3567.                          key integer = $0023;
  3568.                          byte;                   /* dh */
  3569.                          byte;                   /* dv */
  3570.                      
  3571.                      case AppleReserved0024:
  3572.                          key integer = $0024;
  3573.              AR24:       unsigned integer = (AR24End - AR24) / 8 - 2;
  3574.                          hex string [$$Word(AR24)];
  3575.              AR24End:
  3576.                      
  3577.                      case AppleReserved0025:
  3578.                          key integer = $0025;
  3579.              AR25:       unsigned integer = (AR25End - AR25) / 8 - 2;
  3580.                          hex string [$$Word(AR25)];
  3581.              AR25End:
  3582.                      
  3583.                      case AppleReserved0026:
  3584.                          key integer = $0026;
  3585.              AR26:       unsigned integer = (AR26End - AR26) / 8 - 2;
  3586.                          hex string [$$Word(AR26)];
  3587.              AR26End:
  3588.                      
  3589.                      case AppleReserved0027:
  3590.                          key integer = $0027;
  3591.              AR27:       unsigned integer = (AR27End - AR27) / 8 - 2;
  3592.                          hex string [$$Word(AR27)];
  3593.              AR27End:
  3594.                      
  3595.                      case LongText:
  3596.                          key integer = $0028;
  3597.                          Point;              /* txLoc */
  3598.                          pstring;            /* text */
  3599.                      
  3600.                      case DHText:
  3601.                          key integer = $0029;
  3602.                          byte;               /* dh */
  3603.                          pstring;            /* text */
  3604.  
  3605.                      case DVText:
  3606.                          key integer = $002A;
  3607.                          byte;               /* dv */
  3608.                          pstring;            /* text */
  3609.  
  3610.                      case DHDVText:
  3611.                          key integer = $002A;
  3612.                          byte;               /* dh */
  3613.                          byte;               /* dv */
  3614.                          pstring;            /* text */
  3615.  
  3616.                      case AppleReserved002C:
  3617.                          key integer = $002C;
  3618.              AR2C:       unsigned integer = (AR2CEnd - AR2C) / 8 - 2;
  3619.                          hex string [$$Word(AR2C)];
  3620.              AR2CEnd:
  3621.                      
  3622.                      case AppleReserved002D:
  3623.                          key integer = $002D;
  3624.              AR2D:       unsigned integer = (AR2DEnd - AR2D) / 8 - 2;
  3625.                          hex string [$$Word(AR2D)];
  3626.              AR2DEnd:
  3627.                      
  3628.                      case AppleReserved002E:
  3629.                          key integer = $002E;
  3630.              AR2E:       unsigned integer = (AR2EEnd - AR2E) / 8 - 2;
  3631.                          hex string [$$Word(AR2E)];
  3632.              AR2EEnd:
  3633.                      
  3634.                      case AppleReserved002F:
  3635.                          key integer = $002F;
  3636.              AR2F:       unsigned integer = (AR2FEnd - AR2F) / 8 - 2;
  3637.                          hex string [$$Word(AR2F)];
  3638.              AR2FEnd:
  3639.                      
  3640.                      case FrameRect:
  3641.                          key integer = $0030;
  3642.                          Rect;
  3643.                          
  3644.                      case PaintRect:
  3645.                          key integer = $0031;
  3646.                          Rect;
  3647.                          
  3648.                      case EraseRect:
  3649.                          key integer = $0032;
  3650.                          Rect;
  3651.                          
  3652.                      case InvertRect:
  3653.                          key integer = $0033;
  3654.                          Rect;
  3655.                          
  3656.                      case FillRect:
  3657.                          key integer = $0034;
  3658.                          Rect;
  3659.                          
  3660.                      case AppleReserved0035:
  3661.                          key integer = $0035;
  3662.                          Rect;
  3663.                          
  3664.                      case AppleReserved0036:
  3665.                          key integer = $0036;
  3666.                          Rect;
  3667.                          
  3668.                      case AppleReserved0037:
  3669.                          key integer = $0037;
  3670.                          Rect;
  3671.                      
  3672.                      case FrameSameRect:
  3673.                          key integer = $0038;
  3674.                      
  3675.                      case PaintSameRect:
  3676.                          key integer = $0039;
  3677.                      
  3678.                      case EraseSameRect:
  3679.                          key integer = $003A;
  3680.                      
  3681.                      case InvertSameRect:
  3682.                          key integer = $003B;
  3683.                      
  3684.                      case FillSameRect:
  3685.                          key integer = $003C;
  3686.                      
  3687.                      case AppleReserved003D:
  3688.                          key integer = $003D;
  3689.                      
  3690.                      case AppleReserved003E:
  3691.                          key integer = $003E;
  3692.                      
  3693.                      case AppleReserved003F:
  3694.                          key integer = $003F;
  3695.                      
  3696.                      case FrameRRect:
  3697.                          key integer = $0040;
  3698.                          Rect;
  3699.                          
  3700.                      case PaintRRect:
  3701.                          key integer = $0041;
  3702.                          Rect;
  3703.                          
  3704.                      case EraseRRect:
  3705.                          key integer = $0042;
  3706.                          Rect;
  3707.                          
  3708.                      case InvertRRect:
  3709.                          key integer = $0043;
  3710.                          Rect;
  3711.                          
  3712.                      case FillRRect:
  3713.                          key integer = $0044;
  3714.                          Rect;
  3715.                          
  3716.                      case AppleReserved0045:
  3717.                          key integer = $0045;
  3718.                          Rect;
  3719.                          
  3720.                      case AppleReserved0046:
  3721.                          key integer = $0046;
  3722.                          Rect;
  3723.                          
  3724.                      case AppleReserved0047:
  3725.                          key integer = $0047;
  3726.                          Rect;
  3727.                      
  3728.                      case FrameSameRRect:
  3729.                          key integer = $0048;
  3730.                      
  3731.                      case PaintSameRRect:
  3732.                          key integer = $0049;
  3733.                      
  3734.                      case EraseSameRRect:
  3735.                          key integer = $004A;
  3736.                      
  3737.                      case InvertSameRRect:
  3738.                          key integer = $004B;
  3739.                      
  3740.                      case FillSameRRect:
  3741.                          key integer = $004C;
  3742.                      
  3743.                      case AppleReserved004D:
  3744.                          key integer = $004D;
  3745.                      
  3746.                      case AppleReserved004E:
  3747.                          key integer = $004E;
  3748.                      
  3749.                      case AppleReserved004F:
  3750.                          key integer = $004F;
  3751.                      
  3752.                      case FrameOval:
  3753.                          key integer = $0050;
  3754.                          Rect;
  3755.                          
  3756.                      case PaintOval:
  3757.                          key integer = $0051;
  3758.                          Rect;
  3759.                          
  3760.                      case EraseOval:
  3761.                          key integer = $0052;
  3762.                          Rect;
  3763.                          
  3764.                      case InvertOval:
  3765.                          key integer = $0053;
  3766.                          Rect;
  3767.                          
  3768.                      case FillOval:
  3769.                          key integer = $0054;
  3770.                          Rect;
  3771.                          
  3772.                      case AppleReserved0055:
  3773.                          key integer = $0055;
  3774.                          Rect;
  3775.                          
  3776.                      case AppleReserved0056:
  3777.                          key integer = $0056;
  3778.                          Rect;
  3779.                          
  3780.                      case AppleReserved0057:
  3781.                          key integer = $0057;
  3782.                          Rect;
  3783.                      
  3784.                      case FrameSameOval:
  3785.                          key integer = $0058;
  3786.                      
  3787.                      case PaintSameOval:
  3788.                          key integer = $0059;
  3789.                      
  3790.                      case EraseSameOval:
  3791.                          key integer = $005A;
  3792.                      
  3793.                      case InvertSameOval:
  3794.                          key integer = $005B;
  3795.                      
  3796.                      case FillSameOval:
  3797.                          key integer = $005C;
  3798.                      
  3799.                      case AppleReserved005D:
  3800.                          key integer = $005D;
  3801.                      
  3802.                      case AppleReserved005E:
  3803.                          key integer = $005E;
  3804.                      
  3805.                      case frameArc:
  3806.                          key integer = $0060;
  3807.                          Rect;
  3808.                          integer;                /* startAngle */
  3809.                          integer;                /* arcAngle */
  3810.                      
  3811.                      case paintArc:
  3812.                          key integer = $0061;
  3813.                          Rect;
  3814.                          integer;                /* startAngle */
  3815.                          integer;                /* arcAngle */
  3816.                      
  3817.                      case eraseArc:
  3818.                          key integer = $0062;
  3819.                          Rect;
  3820.                          integer;                /* startAngle */
  3821.                          integer;                /* arcAngle */
  3822.                      
  3823.                      case invertArc:
  3824.                          key integer = $0063;
  3825.                          Rect;
  3826.                          integer;                /* startAngle */
  3827.                          integer;                /* arcAngle */
  3828.                      
  3829.                      case fillArc:
  3830.                          key integer = $0064;
  3831.                          Rect;
  3832.                          integer;                /* startAngle */
  3833.                          integer;                /* arcAngle */
  3834.                      
  3835.                      case AppleReserved0065:
  3836.                          key integer = $0065;
  3837.                          Rect;
  3838.                          integer;                /* startAngle */
  3839.                          integer;                /* arcAngle */
  3840.                      
  3841.                      case AppleReserved0066:
  3842.                          key integer = $0066;
  3843.                          Rect;
  3844.                          integer;                /* startAngle */
  3845.                          integer;                /* arcAngle */
  3846.                      
  3847.                      case AppleReserved0067:
  3848.                          key integer = $0067;
  3849.                          Rect;
  3850.                          integer;                /* startAngle */
  3851.                          integer;                /* arcAngle */
  3852.                      
  3853.                      case frameSameArc:
  3854.                          key integer = $0068;
  3855.                          integer;                /* startAngle */
  3856.                          integer;                /* arcAngle */
  3857.  
  3858.                      case paintSameArc:
  3859.                          key integer = $0069;
  3860.                          integer;                /* startAngle */
  3861.                          integer;                /* arcAngle */
  3862.  
  3863.                      case eraseSameArc:
  3864.                          key integer = $006A;
  3865.                          integer;                /* startAngle */
  3866.                          integer;                /* arcAngle */
  3867.  
  3868.                      case invertSameArc:
  3869.                          key integer = $006B;
  3870.                          integer;                /* startAngle */
  3871.                          integer;                /* arcAngle */
  3872.  
  3873.                      case fillSameArc:
  3874.                          key integer = $006C;
  3875.                          integer;                /* startAngle */
  3876.                          integer;                /* arcAngle */
  3877.                      
  3878.                      case AppleReserved006D:
  3879.                          key integer = $006D;
  3880.                          integer;                /* startAngle */
  3881.                          integer;                /* arcAngle */
  3882.                      
  3883.                      case AppleReserved006E:
  3884.                          key integer = $006E;
  3885.                          integer;                /* startAngle */
  3886.                          integer;                /* arcAngle */
  3887.                      
  3888.                      case AppleReserved006F:
  3889.                          key integer = $006F;
  3890.                          integer;                /* startAngle */
  3891.                          integer;                /* arcAngle */
  3892.                      
  3893.                      case framePoly:
  3894.                          key integer = $0070;
  3895.                          integer = $$CountOf(framePoly) * 4 + 10;
  3896.                          Rect;                   /* enclosing rectangle */
  3897.                          array framePoly {
  3898.                              Point;
  3899.                          };
  3900.                      
  3901.                      case paintPoly:
  3902.                          key integer = $0071;
  3903.                          integer = $$CountOf(framePoly) * 4 + 10;
  3904.                          Rect;                   /* enclosing rectangle */
  3905.                          array framePoly {
  3906.                              Point;
  3907.                          };
  3908.                      
  3909.                      case erasePoly:
  3910.                          key integer = $0072;
  3911.                          integer = $$CountOf(framePoly) * 4 + 10;
  3912.                          Rect;                   /* enclosing rectangle */
  3913.                          array framePoly {
  3914.                              Point;
  3915.                          };
  3916.                      
  3917.                      case invertPoly:
  3918.                          key integer = $0073;
  3919.                          integer = $$CountOf(framePoly) * 4 + 10;
  3920.                          Rect;                   /* enclosing rectangle */
  3921.                          array framePoly {
  3922.                              Point;
  3923.                          };
  3924.                      
  3925.                      case fillPoly:
  3926.                          key integer = $0074;
  3927.                          integer = $$CountOf(framePoly) * 4 + 10;
  3928.                          Rect;                   /* enclosing rectangle */
  3929.                          array framePoly {
  3930.                              Point;
  3931.                          };
  3932.                      
  3933.                      case AppleReserved0075:
  3934.                          key integer = $0075;
  3935.                          integer = $$CountOf(framePoly) * 4 + 10;
  3936.                          Rect;                   /* enclosing rectangle */
  3937.                          array framePoly {
  3938.                              Point;
  3939.                          };
  3940.                      
  3941.                      case AppleReserved0076:
  3942.                          key integer = $0076;
  3943.                          integer = $$CountOf(framePoly) * 4 + 10;
  3944.                          Rect;                   /* enclosing rectangle */
  3945.                          array framePoly {
  3946.                              Point;
  3947.                          };
  3948.                      
  3949.                      case AppleReserved0077:
  3950.                          key integer = $0077;
  3951.                          integer = $$CountOf(framePoly) * 4 + 10;
  3952.                          Rect;                   /* enclosing rectangle */
  3953.                          array framePoly {
  3954.                              Point;
  3955.                          };
  3956.                      
  3957.                      case frameSamePoly:
  3958.                          key integer = $0078;
  3959.  
  3960.                      case paintSamePoly:
  3961.                          key integer = $0079;
  3962.  
  3963.                      case eraseSamePoly:
  3964.                          key integer = $007A;
  3965.  
  3966.                      case invertSamePoly:
  3967.                          key integer = $007B;
  3968.  
  3969.                      case fillSamePoly:
  3970.                          key integer = $007C;
  3971.  
  3972.                      case AppleReserved007D:
  3973.                          key integer = $007D;
  3974.  
  3975.                      case AppleReserved007E:
  3976.                          key integer = $007E;
  3977.  
  3978.                      case AppleReserved007F:
  3979.                          key integer = $007F;
  3980.  
  3981.                      case frameRgn:
  3982.                          key integer = $0080;
  3983.  frameRgnStart2:         integer = (frameRgnEnd2[$$ArrayIndex(OpCodes)] - frameRgnStart2[$$ArrayIndex(OpCodes)]) >> 3;
  3984.                          Rect;               /* region's enclosing rect */
  3985.                          hex string [$$Word(frameRgnStart2[$$ArrayIndex(OpCodes)]) - 10];
  3986.  frameRgnEnd2:
  3987.                      case paintRgn:
  3988.                          key integer = $0081;
  3989.  paintRgnStart2:         integer = (paintRgnEnd2[$$ArrayIndex(OpCodes)] - paintRgnStart2[$$ArrayIndex(OpCodes)]) >> 3;
  3990.                          Rect;               /* region's enclosing rect */
  3991.                          hex string [$$Word(paintRgnStart2[$$ArrayIndex(OpCodes)]) - 10];
  3992.  paintRgnEnd2:
  3993.                      case eraseRgn:
  3994.                          key integer = $0082;
  3995.  eraseRgnStart2:         integer = (eraseRgnEnd2[$$ArrayIndex(OpCodes)] - eraseRgnStart2[$$ArrayIndex(OpCodes)]) >> 3;
  3996.                          Rect;               /* region's enclosing rect */
  3997.                          hex string [$$Word(eraseRgnStart2[$$ArrayIndex(OpCodes)]) - 10];
  3998.  eraseRgnEnd2:
  3999.                      case invertRgn:
  4000.                          key integer = $0083;
  4001.  invertRgnStart2:        integer = (invertRgnEnd2[$$ArrayIndex(OpCodes)] - invertRgnStart2[$$ArrayIndex(OpCodes)]) >> 3;
  4002.                          Rect;               /* region's enclosing rect */
  4003.                          hex string [$$Word(invertRgnStart2[$$ArrayIndex(OpCodes)]) - 10];
  4004.  invertRgnEnd2:
  4005.                      case fillRgn:
  4006.                          key integer = $0084;
  4007.  fillRgnStart2:          integer = (fillRgnEnd2[$$ArrayIndex(OpCodes)] - fillRgnStart2[$$ArrayIndex(OpCodes)]) >> 3;
  4008.                          Rect;               /* region's enclosing rect */
  4009.                          hex string [$$Word(fillRgnStart2[$$ArrayIndex(OpCodes)]) - 10];
  4010.  fillRgnEnd2:
  4011.                      case AppleReserved0085:
  4012.                          key integer = $0085;
  4013.  AppleReserved0085Start:integer = (AppleReserved0085End[$$ArrayIndex(OpCodes)] - AppleReserved0085Start[$$ArrayIndex(OpCodes)]) >> 3;
  4014.                          Rect;               /* region's enclosing rect */
  4015.                          hex string [$$Word(AppleReserved0085Start[$$ArrayIndex(OpCodes)]) - 10];
  4016.  AppleReserved0085End:
  4017.                      case AppleReserved0086:
  4018.                          key integer = $0086;
  4019.  AppleReserved0086Start: integer = (AppleReserved0086End[$$ArrayIndex(OpCodes)] - AppleReserved0086Start[$$ArrayIndex(OpCodes)]) >> 3;
  4020.                          Rect;               /* region's enclosing rect */
  4021.                          hex string [$$Word(AppleReserved0086Start[$$ArrayIndex(OpCodes)]) - 10];
  4022.  AppleReserved0086End:
  4023.                      case AppleReserved0087:
  4024.                          key integer = $0087;
  4025.  AppleReserved0087Start: integer = (AppleReserved0087End[$$ArrayIndex(OpCodes)] - AppleReserved0087Start[$$ArrayIndex(OpCodes)]) >> 3;
  4026.                          Rect;               /* region's enclosing rect */
  4027.                          hex string [$$Word(AppleReserved0087Start[$$ArrayIndex(OpCodes)]) - 10];
  4028.  AppleReserved0087End:
  4029.                      case frameSameRgn:
  4030.                          key integer = $0088;
  4031.  
  4032.                      case paintSameRgn:
  4033.                          key integer = $0089;
  4034.  
  4035.                      case eraseSameRgn:
  4036.                          key integer = $008A;
  4037.  
  4038.                      case invertSameRgn:
  4039.                          key integer = $008B;
  4040.  
  4041.                      case fillSameRgn:
  4042.                          key integer = $008C;
  4043.  
  4044.                      case AppleReserved008D:
  4045.                          key integer = $008D;
  4046.  
  4047.                      case AppleReserved008E:
  4048.                          key integer = $008E;
  4049.  
  4050.                      case AppleReserved008F:
  4051.                          key integer = $008F;
  4052.  
  4053.                      case BitsRect:
  4054.                          key integer = $0090;
  4055.                          unsigned bitstring[1] = 1;                              /* New pixMap flag      */
  4056.                          unsigned bitstring[2] = 0;                              /* Must be 0            */
  4057.  BitsRectpMapRowBytes:   unsigned bitstring[13];                                 /* Offset to next row   */
  4058.  BitsRectBounds2:        rect;                                                   /* Bitmap bounds        */
  4059.                          integer;                                                /* pixMap vers number   */
  4060.                          integer unpacked;                                       /* Packing format       */
  4061.                          unsigned longint;                                       /* Size of pixel data   */
  4062.                          unsigned hex longint;                                   /* h. resolution (ppi) (fixed) */
  4063.                          unsigned hex longint;                                   /* v. resolution (ppi) (fixed) */
  4064.                          integer         chunky, chunkyPlanar, planar;           /* Pixel storage format */
  4065.                          integer;                                                /* # bits in pixel      */
  4066.                          integer;                                                /* # components in pixel*/
  4067.                          integer;                                                /* # bits per field     */
  4068.                          unsigned longint;                                       /* Offset to next plane */
  4069.                          unsigned longint;                                       /* Offset to color table*/
  4070.                          fill long;                                              /* Reserved             */
  4071.                          /* Color Table */
  4072.                          unsigned hex longint;                                   /* ctSeed               */
  4073.                          integer;                                                /* ctFlags              */
  4074.                          integer = $$Countof(ColorSpec) - 1;                     /* ctSize               */
  4075.                          wide array ColorSpec {
  4076.                                  integer;                                        /* value                */
  4077.                                  unsigned integer;                               /* RGB: red             */
  4078.                                  unsigned integer;                               /*      green           */
  4079.                                  unsigned integer;                               /*      blue            */
  4080.                          };
  4081.                          Rect;                       /* srcRect */
  4082.                          Rect;                       /* destRect */
  4083.                          integer     srcCopy, srcOr, srcXor, srcBic, /* mode */
  4084.                                      notSrcCopy, notSrcOr, notSrcXor,
  4085.                                      notSrcBic, patCopy, patOr, patXor,
  4086.                                      patBic, notPatCopy, notPatOr, notPatBic,
  4087.                                      blend = 32, addPin, addOver, subPin,
  4088.                                      adMax = 37, subOver, adMin;
  4089.  BitsRectBits:           hex string [$$BitField(BitsRectpMapRowBytes[$$ArrayIndex(OpCodes)],0,13) *
  4090.                                      ($$BitField(BitsRectBounds2[$$ArrayIndex(OpCodes)],32,16)
  4091.                                      - $$BitField(BitsRectBounds2[$$ArrayIndex(OpCodes)],0,16))];
  4092.                      
  4093.                      
  4094.                      case BitsRgn:
  4095.                          key integer = $0091;
  4096.                          unsigned bitstring[1] = 1;                              /* New pixMap flag      */
  4097.                          unsigned bitstring[2] = 0;                              /* Must be 0            */
  4098.  BitsRgnpMapRowBytes:    unsigned bitstring[13];                                 /* Offset to next row   */
  4099.  BitsRgnBounds2:         rect;                                                   /* Bitmap bounds        */
  4100.                          integer;                                                /* pixMap vers number   */
  4101.                          integer unpacked;                                       /* Packing format       */
  4102.                          unsigned longint;                                       /* Size of pixel data   */
  4103.                          unsigned hex longint;                                   /* h. resolution (ppi) (fixed) */
  4104.                          unsigned hex longint;                                   /* v. resolution (ppi) (fixed) */
  4105.                          integer         chunky, chunkyPlanar, planar;           /* Pixel storage format */
  4106.                          integer;                                                /* # bits in pixel      */
  4107.                          integer;                                                /* # components in pixel*/
  4108.                          integer;                                                /* # bits per field     */
  4109.                          unsigned longint;                                       /* Offset to next plane */
  4110.                          unsigned longint;                                       /* Offset to color table*/
  4111.                          fill long;                                              /* Reserved             */
  4112.                          /* Color Table */
  4113.                          unsigned hex longint;                                   /* ctSeed               */
  4114.                          integer;                                                /* ctFlags              */
  4115.                          integer = $$Countof(ColorSpec) - 1;                     /* ctSize               */
  4116.                          wide array ColorSpec {
  4117.                                  integer;                                        /* value                */
  4118.                                  unsigned integer;                               /* RGB: red             */
  4119.                                  unsigned integer;                               /*      green           */
  4120.                                  unsigned integer;                               /*      blue            */
  4121.                          };
  4122.                          Rect;                       /* srcRect */
  4123.                          Rect;                       /* destRect */
  4124.                          integer     srcCopy, srcOr, srcXor, srcBic, /* mode */
  4125.                                      notSrcCopy, notSrcOr, notSrcXor,
  4126.                                      notSrcBic, patCopy, patOr, patXor,
  4127.                                      patBic, notPatCopy, notPatOr, notPatBic,
  4128.                                      blend = 32, addPin, addOver, subPin,
  4129.                                      adMax = 37, subOver, adMin;
  4130.  BitsRgnStart2:          integer = (BitsRgnEnd2[$$ArrayIndex(OpCodes)] - BitsRgnStart2[$$ArrayIndex(OpCodes)]) >> 3;
  4131.                          Rect;               /* region's enclosing rect */
  4132.                          hex string [$$Word(BitsRgnStart2[$$ArrayIndex(OpCodes)]) - 10];
  4133.  BitsRgnEnd2:            hex string [$$PackedSize(BitsRgnEnd2[$$ArrayIndex(OpCodes)],
  4134.                                      $$BitField(BitsRgnpMapRowBytes[$$ArrayIndex(OpCodes)],0,13),
  4135.                                      ($$BitField(BitsRgnBounds2[$$ArrayIndex(OpCodes)],32,16)
  4136.                                      - $$BitField(BitsRgnBounds2[$$ArrayIndex(OpCodes)],0,16)))];
  4137.  
  4138.                      case AppleReserved0092:
  4139.                          key integer = $0092;
  4140.  AppleReserved0092Start: unsigned integer = (AppleReserved0092End[$$ArrayIndex(OpCodes)] - AppleReserved0092Start[$$ArrayIndex(OpCodes)]) >> 3 - 2;
  4141.                          hex string [$$Word(AppleReserved0092Start[$$ArrayIndex(OpCodes)])];
  4142.  AppleReserved0092End:
  4143.                      case AppleReserved0093:
  4144.                          key integer = $0093;
  4145.  AppleReserved0093Start: unsigned integer = (AppleReserved0093End[$$ArrayIndex(OpCodes)] - AppleReserved0093Start[$$ArrayIndex(OpCodes)]) >> 3 - 2;
  4146.                          hex string [$$Word(AppleReserved0093Start[$$ArrayIndex(OpCodes)])];
  4147.  AppleReserved0093End:
  4148.                      case AppleReserved0094:
  4149.                          key integer = $0094;
  4150.  AppleReserved0094Start: unsigned integer = (AppleReserved0094End[$$ArrayIndex(OpCodes)] - AppleReserved0094Start[$$ArrayIndex(OpCodes)]) >> 3 - 2;
  4151.                          hex string [$$Word(AppleReserved0094Start[$$ArrayIndex(OpCodes)])];
  4152.  AppleReserved0094End:
  4153.                      case AppleReserved0095:
  4154.                          key integer = $0095;
  4155.  AppleReserved0095Start: unsigned integer = (AppleReserved0095End[$$ArrayIndex(OpCodes)] - AppleReserved0095Start[$$ArrayIndex(OpCodes)]) >> 3 - 2;
  4156.                          hex string [$$Word(AppleReserved0095Start[$$ArrayIndex(OpCodes)])];
  4157.  AppleReserved0095End:
  4158.                      case AppleReserved0096:
  4159.                          key integer = $0096;
  4160.  AppleReserved0096Start: unsigned integer = (AppleReserved0096End[$$ArrayIndex(OpCodes)] - AppleReserved0096Start[$$ArrayIndex(OpCodes)]) >> 3 - 2;
  4161.                          hex string [$$Word(AppleReserved0096Start[$$ArrayIndex(OpCodes)])];
  4162.  AppleReserved0096End:
  4163.                      case AppleReserved0097:
  4164.                          key integer = $0097;
  4165.  AppleReserved0097Start: unsigned integer = (AppleReserved0097End[$$ArrayIndex(OpCodes)] - AppleReserved0097Start[$$ArrayIndex(OpCodes)]) >> 3 - 2;
  4166.                          hex string [$$Word(AppleReserved0097Start[$$ArrayIndex(OpCodes)])];
  4167.  AppleReserved0097End:
  4168.                      case PackBitsRect:
  4169.                          key integer = $0098;
  4170.                          unsigned bitstring[1] = 1;                              /* New pixMap flag      */
  4171.                          unsigned bitstring[2] = 0;                              /* Must be 0            */
  4172.  PackBitsRectpMapRowBytes:unsigned bitstring[13];                                    /* Offset to next row   */
  4173.  PackBitsRectBounds2:    rect;                                                   /* Bitmap bounds        */
  4174.                          integer;                                                /* pixMap vers number   */
  4175.                          integer unpacked;                                       /* Packing format       */
  4176.                          unsigned longint;                                       /* Size of pixel data   */
  4177.                          unsigned hex longint;                                   /* h. resolution (ppi) (fixed) */
  4178.                          unsigned hex longint;                                   /* v. resolution (ppi) (fixed) */
  4179.                          integer         chunky, chunkyPlanar, planar;           /* Pixel storage format */
  4180.                          integer;                                                /* # bits in pixel      */
  4181.                          integer;                                                /* # components in pixel*/
  4182.                          integer;                                                /* # bits per field     */
  4183.                          unsigned longint;                                       /* Offset to next plane */
  4184.                          unsigned longint;                                       /* Offset to color table*/
  4185.                          fill long;                                              /* Reserved             */
  4186.                          /* Color Table */
  4187.                          unsigned hex longint;                                   /* ctSeed               */
  4188.                          integer;                                                /* ctFlags              */
  4189.                          integer = $$Countof(ColorSpec) - 1;                     /* ctSize               */
  4190.                          wide array ColorSpec {
  4191.                                  integer;                                        /* value                */
  4192.                                  unsigned integer;                               /* RGB: red             */
  4193.                                  unsigned integer;                               /*      green           */
  4194.                                  unsigned integer;                               /*      blue            */
  4195.                          };
  4196.                          Rect;                       /* srcRect */
  4197.                          Rect;                       /* destRect */
  4198.                          integer     srcCopy, srcOr, srcXor, srcBic, /* mode */
  4199.                                      notSrcCopy, notSrcOr, notSrcXor,
  4200.                                      notSrcBic, patCopy, patOr, patXor,
  4201.                                      patBic, notPatCopy, notPatOr, notPatBic,
  4202.                                      blend = 32, addPin, addOver, subPin,
  4203.                                      adMax = 37, subOver, adMin;
  4204.  PackBitsRectBits:       hex string [$$PackedSize(PackBitsRectBits[$$ArrayIndex(OpCodes)],
  4205.                                      $$BitField(PackBitsRectpMapRowBytes[$$ArrayIndex(OpCodes)],0,13),
  4206.                                      ($$BitField(PackBitsRectBounds2[$$ArrayIndex(OpCodes)],32,16)
  4207.                                      - $$BitField(PackBitsRectBounds2[$$ArrayIndex(OpCodes)],0,16)))];
  4208.                      
  4209.                      case PackBitsRgn:
  4210.                          key integer = $0099;
  4211.                          unsigned bitstring[1] = 1;                              /* New pixMap flag      */
  4212.                          unsigned bitstring[2] = 0;                              /* Must be 0            */
  4213.  PackBitsRgnpMapRowBytes:unsigned bitstring[13];                                 /* Offset to next row   */
  4214.  PackBitsRgnBounds2: rect;                                                       /* Bitmap bounds        */
  4215.                          integer;                                                /* pixMap vers number   */
  4216.                          integer unpacked;                                       /* Packing format       */
  4217.                          unsigned longint;                                       /* Size of pixel data   */
  4218.                          unsigned hex longint;                                   /* h. resolution (ppi) (fixed) */
  4219.                          unsigned hex longint;                                   /* v. resolution (ppi) (fixed) */
  4220.                          integer         chunky, chunkyPlanar, planar;           /* Pixel storage format */
  4221.                          integer;                                                /* # bits in pixel      */
  4222.                          integer;                                                /* # components in pixel*/
  4223.                          integer;                                                /* # bits per field     */
  4224.                          unsigned longint;                                       /* Offset to next plane */
  4225.                          unsigned longint;                                       /* Offset to color table*/
  4226.                          fill long;                                              /* Reserved             */
  4227.                          /* Color Table */
  4228.                          unsigned hex longint;                                   /* ctSeed               */
  4229.                          integer;                                                /* ctFlags              */
  4230.                          integer = $$Countof(ColorSpec) - 1;                     /* ctSize               */
  4231.                          wide array ColorSpec {
  4232.                                  integer;                                        /* value                */
  4233.                                  unsigned integer;                               /* RGB: red             */
  4234.                                  unsigned integer;                               /*      green           */
  4235.                                  unsigned integer;                               /*      blue            */
  4236.                          };
  4237.                          Rect;                       /* srcRect */
  4238.                          Rect;                       /* destRect */
  4239.                          integer     srcCopy, srcOr, srcXor, srcBic, /* mode */
  4240.                                      notSrcCopy, notSrcOr, notSrcXor,
  4241.                                      notSrcBic, patCopy, patOr, patXor,
  4242.                                      patBic, notPatCopy, notPatOr, notPatBic,
  4243.                                      blend = 32, addPin, addOver, subPin,
  4244.                                      adMax = 37, subOver, adMin;
  4245.  packBitsRgnStart2:      integer = (packBitsRgnEnd2[$$ArrayIndex(OpCodes)] - packBitsRgnStart2[$$ArrayIndex(OpCodes)]) >> 3;
  4246.                          Rect;               /* region's enclosing rect */
  4247.                          hex string [$$Word(packBitsRgnStart2[$$ArrayIndex(OpCodes)]) - 10];
  4248.  packBitsRgnEnd2:        hex string [$$PackedSize(packBitsRgnEnd2[$$ArrayIndex(OpCodes)],
  4249.                                      $$BitField(PackBitsRgnpMapRowBytes[$$ArrayIndex(OpCodes)],0,13),
  4250.                                      ($$BitField(PackBitsRgnBounds2[$$ArrayIndex(OpCodes)],32,16)
  4251.                                      - $$BitField(PackBitsRgnBounds2[$$ArrayIndex(OpCodes)],0,16)))];
  4252.  
  4253.                      case AppleReserved009A:
  4254.                          key integer = $009A;
  4255.  AppleReserved009AStart: unsigned integer = (AppleReserved009AEnd[$$ArrayIndex(OpCodes)] - AppleReserved009AStart[$$ArrayIndex(OpCodes)]) >> 3 - 2;
  4256.                          hex string [$$Word(AppleReserved009AStart[$$ArrayIndex(OpCodes)])];
  4257.  AppleReserved009AEnd:
  4258.                      case AppleReserved009B:
  4259.                          key integer = $009B;
  4260.  AppleReserved009BStart: unsigned integer = (AppleReserved009BEnd[$$ArrayIndex(OpCodes)] - AppleReserved009BStart[$$ArrayIndex(OpCodes)]) >> 3 - 2;
  4261.                          hex string [$$Word(AppleReserved009BStart[$$ArrayIndex(OpCodes)])];
  4262.  AppleReserved009BEnd:
  4263.                      case AppleReserved009C:
  4264.                          key integer = $009C;
  4265.  AppleReserved009CStart: unsigned integer = (AppleReserved009CEnd[$$ArrayIndex(OpCodes)] - AppleReserved009CStart[$$ArrayIndex(OpCodes)]) >> 3 - 2;
  4266.                          hex string [$$Word(AppleReserved009CStart[$$ArrayIndex(OpCodes)])];
  4267.  AppleReserved009CEnd:
  4268.                      case AppleReserved009D:
  4269.                          key integer = $009D;
  4270.  AppleReserved009DStart: unsigned integer = (AppleReserved009DEnd[$$ArrayIndex(OpCodes)] - AppleReserved009DStart[$$ArrayIndex(OpCodes)]) >> 3 - 2;
  4271.                          hex string [$$Word(AppleReserved009DStart[$$ArrayIndex(OpCodes)])];
  4272.  AppleReserved009DEnd:
  4273.                      case AppleReserved009E:
  4274.                          key integer = $009E;
  4275.  AppleReserved009EStart: unsigned integer = (AppleReserved009EEnd[$$ArrayIndex(OpCodes)] - AppleReserved009EStart[$$ArrayIndex(OpCodes)]) >> 3 - 2;
  4276.                          hex string [$$Word(AppleReserved009EStart[$$ArrayIndex(OpCodes)])];
  4277.  AppleReserved009EEnd:
  4278.                      case AppleReserved009F:
  4279.                          key integer = $009F;
  4280.  AppleReserved009FStart: unsigned integer = (AppleReserved009FEnd[$$ArrayIndex(OpCodes)] - AppleReserved009FStart[$$ArrayIndex(OpCodes)]) >> 3 - 2;
  4281.                          hex string [$$Word(AppleReserved009FStart[$$ArrayIndex(OpCodes)])];
  4282.  AppleReserved009FEnd:
  4283.                      case ShortComment:
  4284.                          key integer = $00A0;
  4285.                          integer;                            /* comment kind */
  4286.                      
  4287.                      case LongComment:
  4288.                          key integer = $00A1;
  4289.                          integer;                            /* comment kind */
  4290.  longCommentStart2:      integer = (longCommentEnd2[$$ArrayIndex(OpCodes)] - longCommentStart2[$$ArrayIndex(OpCodes)] - 16) >> 3;
  4291.                          hex string [$$Word(longCommentStart2[$$ArrayIndex(OpCodes)])];
  4292.  longCommentEnd2:
  4293.                      case OpEndPic:
  4294.                          key integer = $00FF;
  4295.                      
  4296.                      case HeaderOp:
  4297.                          key integer = $0C00;
  4298.                          longint     Version2 = -1;
  4299.                          /* Fixed point bounding box */
  4300.                          unsigned hex longint;
  4301.                          unsigned hex longint;
  4302.                          unsigned hex longint;
  4303.                          unsigned hex longint;
  4304.                          longint     Version2 = -1;      /* Reserved */
  4305.                      
  4306.                  };
  4307.                  align word;
  4308.              };
  4309.      };
  4310.  endOfPict:
  4311. };
  4312.  
  4313. æKY DRVW
  4314. æC  /*
  4315.  * Macintosh Programmer's Workshop
  4316.  * DRVR resource type 'DRVR' (requires DRVRRuntime.o)
  4317.  */
  4318.  
  4319. # define mDownMask      2        /* Event mask values for drvrEMask */
  4320. # define mUpMask        4
  4321. # define keyDownMask    8
  4322. # define keyUpMask     16
  4323. # define autoKeyMask   32
  4324. # define updateMask    64
  4325. # define diskMask     128
  4326. # define activMask    256
  4327. # define networkMask 1024
  4328. # define driverMask  2048
  4329. # define everyEvent    -1
  4330.  
  4331. /*
  4332.  * When building a DRVR resource, insert the line:
  4333.  *
  4334.  *       type 'DRVR' as 'DRVW';
  4335.  *
  4336.  * in your resource file before your "resource 'DRVR' ..." declaration.
  4337.  */
  4338.  
  4339. type 'DRVW' {
  4340.  boolean = 0;                            /* unused */
  4341.  boolean dontNeedLock,    needLock;      /* lock drvr in memory  */
  4342.  boolean dontNeedTime,    needTime;      /* for periodic action  */
  4343.  boolean dontNeedGoodbye, needGoodbye;   /* call before heap reinit*/
  4344.  boolean noStatusEnable,  statusEnable;  /* responds to status   */
  4345.  boolean noCtlEnable,     ctlEnable;     /* responds to control  */
  4346.  boolean noWriteEnable,   writeEnable;   /* responds to write    */
  4347.  boolean noReadEnable,    readEnable;    /* responds to read     */
  4348.  
  4349.  byte = 0;                   /* low byte of drvrFlags word unused */
  4350.  
  4351.  unsigned integer;           /* driver delay (ticks) */
  4352.  integer;                    /* desk acc event mask  */
  4353.  integer;                    /* driver menu ID       */
  4354.  
  4355.  unsigned integer = 50;      /* offset to DRVRRuntime open   */
  4356.  unsigned integer = 54;      /* offset to DRVRRuntime prime  */
  4357.  unsigned integer = 58;      /* offset to DRVRRuntime control*/
  4358.  unsigned integer = 62;      /* offset to DRVRRuntime status */
  4359.  unsigned integer = 66;      /* offset to DRVRRuntime close  */
  4360.  
  4361.  pstring[31];                /* driver name */
  4362.  
  4363.  hex string;                 /* driver code (use $$resource(...)) */
  4364. };
  4365. æKY cmdo
  4366. æC  
  4367. type 'cmdo' {
  4368.   integer = CMDOVersion;                                 /* Version number */
  4369.   integer = $$CountOf(dialogs);                              /* # of dialogs, at least 1 */
  4370.   array dialogs {
  4371.  integer;                                                /* height of the dialog */
  4372.  cstring;                                                /* text displayed in help window */
  4373.  align word;
  4374.  
  4375.  integer = $$CountOf(itemArray);                         /* # of items */
  4376.  
  4377.  /* The order in which Commando writes out the options is the same order in which the
  4378.     items in this array are entered in your resource declaration.  This is important
  4379.     for those commands which have position dependent parameters. */
  4380.     
  4381.  wide array itemArray {
  4382.      switch {
  4383.          case NotDependent:
  4384.              key int = 0;
  4385.          
  4386.          case Or:
  4387.              key byte = 1;
  4388.              byte = $$CountOf(OrArray);
  4389.              wide array OrArray {
  4390.                  int;                                    /* item number dependent upon */
  4391.              };
  4392.          
  4393.          case And:
  4394.              key byte = 2;
  4395.              byte = $$CountOf(AndArray);
  4396.              wide array AndArray {
  4397.                  int;                                    /* item number dependent upon */
  4398.              };
  4399.      };
  4400.      switch {
  4401.          case Files:
  4402.              key byte = FilesID;
  4403.              byte    InputFile,                          /* These types require the  */
  4404.                      InputFileOrDir,                     /* 'Additional' case below. */
  4405.                      InputOrOutputFile,
  4406.                      InputOrOutputOrDir,
  4407.                      
  4408.                      OutputFile,                         /* These types require the  */
  4409.                      OutputFileOrDir,                    /* 'NoMore' case below.     */
  4410.                      DirOnly;
  4411.              switch {
  4412.                  case OptionalFile:
  4413.                      /* Using this case makes a popup with two or three items.
  4414.                         This first item is used to select a default file or to
  4415.                         select no file.  The second (and third) item(s) are used
  4416.                         to select input or output files. */
  4417.                      key int = 0;
  4418.                      rect;                               /* bounds of title */
  4419.                      rect;                               /* bounds of display box */
  4420.                      cstring;                            /* title */
  4421.                      cstring;                            /* default file */
  4422.                      cstring;                            /* option to return before file */
  4423.                      cstring;                            /* If this item is dependent upon
  4424.                                                             another Files item, an extension
  4425.                                                             can be specified here to be added
  4426.                                                             to the dependents file. */
  4427.                      cstring;                            /* help text for popup */
  4428.                      byte        dim, dontDim;           /* Normally, dependent items are
  4429.                                                             dimmed if the parent is disabled,
  4430.                                                             if this field is "dontDim", then
  4431.                                                             this item won't be dimmed */
  4432.                      /* These next three strings are the strings displayed in the popup.  Most
  4433.                         of the file types have only two strings but InputOrOutputFile and 
  4434.                         InputOrOutputOrDir require three strings.  If a string is set to "",
  4435.                         Commando will use a built-in default. */
  4436.                      cstring;                            /* popup item #1 */
  4437.                      cstring;                            /* popup item #2 */
  4438.                      cstring;                            /* popup item #3 */
  4439.              
  4440.                  case RequiredFile:
  4441.                      /* Using this case makes a button that goes directly to standard
  4442.                         file.  Use this case when a file is required and the user doesn't
  4443.                         have the choice of a default file or no file. */
  4444.                      key int = 1;
  4445.                      rect;                               /* bounds of button */
  4446.                      cstring;                            /* title of button */
  4447.                      cstring;                            /* option to return before file */
  4448.                      cstring;                            /* help text for button */
  4449.              };
  4450.              
  4451.              /* Some file types take additional information.  See the comment next to the
  4452.                 file types to find out which case to choose here. */
  4453.              switch {
  4454.                  case Additional:
  4455.                      key byte = 0;
  4456.                      cstring;                                    /* For InputOrOutputFile, an option
  4457.                                                                     can be specified when a new
  4458.                                                                     (or output) file is chosen. */
  4459.                      cstring FilterTypes = ":";                  /* preferred file extension (i.e. ".c") 
  4460.                                                                     If null, no radio buttons will be
  4461.                                                                     displayed.  If FilterTypes is used,
  4462.                                                                     the radio buttons will toggle
  4463.                                                                     between showing files only with
  4464.                                                                     the types below and all files */
  4465.                      cstring;                                    /* title of only files button */
  4466.                      cstring;                                    /* title of all files button */
  4467.                      byte = $$CountOf(TypesArray);               /* up to 4 types may be specified */
  4468.                      align word;
  4469.                      array TypesArray {
  4470.                          literal longint     text = 'TEXT',      /* desired input file type, specify */
  4471.                                              obj  = 'OBJ ',      /* no type for all types */
  4472.                                              appl = 'APPL',
  4473.                                              da   = 'DFIL',
  4474.                                              tool = 'MPST';
  4475.                      };
  4476.  
  4477.                  case NoMore:
  4478.                      key byte = 1;
  4479.              };
  4480.  
  4481.          case MultiFiles:
  4482.              key byte = MultiFilesID;
  4483.              cstring;                                    /* button title */
  4484.              cstring;                                    /* help text for button */
  4485.              align word;
  4486.              rect;                                       /* bounds of button */
  4487.              cstring;                                    /* message like " Source files to compile: " */
  4488.              cstring;                                    /* option returned before each 
  4489.                                                             filename. Can be null */
  4490.              switch {
  4491.                  case MultiInputFiles:
  4492.                      key byte = 0;
  4493.                      byte = $$CountOf(MultiTypesArray);          /* up to 4 types may be specified */
  4494.                      align word;
  4495.                      array MultiTypesArray {
  4496.                          literal longint     text = 'TEXT',      /* desired input file type, specify no type */
  4497.                                              obj  = 'OBJ ',      /* for all types */
  4498.                                              appl = 'APPL',
  4499.                                              da   = 'DFIL',
  4500.                                              tool = 'MPST';
  4501.                      };
  4502.                      cstring FilterTypes = ":";                  /* preferred file extension (i.e. ".c") 
  4503.                                                                     If null, no radio buttons will be
  4504.                                                                     displayed.  If FilterTypes is used,
  4505.                                                                     the radio buttons will toggle
  4506.                                                                     between showing files only with
  4507.                                                                     the types below and all files */
  4508.                      cstring;                                    /* title of only files button */
  4509.                      cstring;                                    /* title of all files button */
  4510.          
  4511.                  case MultiDirs:
  4512.                      key byte = 1;
  4513.  
  4514.                  case MultiInputFilesAndDirs:
  4515.                      key byte = 2;
  4516.  
  4517.                  case MultiOutputFiles:
  4518.                      key byte = 3;
  4519.              };
  4520.  
  4521.          case CheckOption:
  4522.              key byte = CheckOptionID;
  4523.              byte    NotSet, Set;                        /* whether button is set or not */
  4524.              rect;                                       /* bounds */
  4525.              cstring;                                    /* title */
  4526.              cstring;                                    /* option returned */
  4527.              cstring;                                    /* help text for button */
  4528.          
  4529.          case RadioButtons:
  4530.              key byte = RadioButtonsID;
  4531.              byte = $$CountOf(radioArray);               /* # of buttons */
  4532.              wide array radioArray {
  4533.                  rect;                                   /* bounds */
  4534.                  cstring;                                /* title */
  4535.                  cstring;                                /* option returned */
  4536.                  byte    NotSet, Set;                    /* whether button is set or not */
  4537.                  cstring;                                /* help text for button */
  4538.                  align word;
  4539.              };
  4540.          
  4541.          case RegularEntry:
  4542.              key byte = RegularEntryID;
  4543.              cstring;                                    /* title */
  4544.              align word;
  4545.              rect;                                       /* bounds of title */
  4546.              rect;                                       /* bounds of input box */
  4547.              cstring;                                    /* default value */
  4548.              byte        ignoreCase, keepCase;           /* the default value is never displayed
  4549.                                                             in the commando window.  If what the
  4550.                                                             user types in the textedit window
  4551.                                                             matches the default value, then that
  4552.                                                             value isn't displayed.  This flag
  4553.                                                             tells Commando whether to ignore case
  4554.                                                             when comparing the contents of the textedit
  4555.                                                             window with the default value. */
  4556.              cstring;                                    /* option returned */
  4557.              cstring;                                    /* help text for entry */
  4558.  
  4559.          case MultiRegularEntry: /* For scrollable, lists of an option */
  4560.              key byte = MultiRegularEntryID;
  4561.              cstring;                                    /* title */
  4562.              align word;
  4563.              rect;                                       /* bounds of title */
  4564.              rect;                                       /* bounds of input list */
  4565.              byte = $$CountOf(DefEntryList);
  4566.              array DefEntryList {
  4567.                  cstring;                                /* default values */
  4568.              };
  4569.              cstring;                                    /* option returned. Each value
  4570.                                                             will be preceded with this
  4571.                                                             option */
  4572.              cstring;                                    /* help text for entry */
  4573.  
  4574.          case Box:       /* Can be used to draw lines too */
  4575.              key byte = BoxID;
  4576.              byte            black, gray;                /* color of object */
  4577.              rect;                                       /* bounds of box or line */
  4578.              
  4579.          case TextBox:   /* Draws a box with title in upper-left */
  4580.              key byte = TextBoxID;
  4581.              byte            black, gray;                /* color of object */
  4582.              rect;                                       /* bounds of box or line */
  4583.              cstring;                                    /* title */
  4584.              
  4585.          case TextTitle:
  4586.              key byte = TextTitleID;
  4587.              byte        plain;                          /* style of text */         
  4588.              rect;                                       /* bounds of title */
  4589.              int         systemFont;                     /* font number to use */
  4590.              int         systemSize;                     /* font size to use */
  4591.              cstring;                                    /* the text to display */
  4592.          
  4593.          case PopUp:
  4594.              key byte = PopUpID;
  4595.              byte        Window, Alias, Font, Set;       /* popup type */
  4596.              rect;                                       /* bounds of title */
  4597.              rect;                                       /* bounds of popup line */
  4598.              cstring;                                    /* title */
  4599.              cstring;                                    /* option returned */
  4600.              cstring;                                    /* help text for popup */
  4601.              byte        noDefault, hasDefault;          /* hasDefault if first item is "Default Value" */
  4602.  
  4603.          case EditPopUp:
  4604.              key byte = EditPopUpID;
  4605.              /* For MenuItem, this EditPopUp must be dependent upon another EditPopUp
  4606.                 of the MenuTitle type so that the control knows whose menu items to
  4607.                 display.
  4608.                 
  4609.                 For FontSize, this EditPopUp must be dependent upon a PopUp of the
  4610.                 Font type so that the control knows what sizes of the font exist. */
  4611.                 
  4612.              byte    MenuTitle, MenuItem,                /* Type of editable pop-up */
  4613.                      FontSize, Alias, Set;
  4614.              rect;                                       /* bounds of title */
  4615.              rect;                                       /* bounds of text edit area */
  4616.              cstring;                                    /* title */
  4617.              cstring;                                    /* option to return */
  4618.              cstring;                                    /* help text for textedit part */
  4619.              cstring;                                    /* help text for popup part */
  4620.              
  4621.          case NestedDialog:
  4622.              key byte = NestedDialogID;
  4623.              byte;                                       /* the number of the dialog
  4624.                                                             to call.  It must be greater
  4625.                                                             than the current dialog */
  4626.              rect;                                       /* bounds of button */
  4627.              cstring;                                    /* button's title */
  4628.              cstring;                                    /* help text for button */
  4629.          
  4630.          case Redirection:
  4631.              key byte = RedirectionID;
  4632.              byte    StandardOutput, DiagnosticOutput,   /* the type of redirection */
  4633.                      StandardInput;
  4634.              point;                                      /* upper-left point of the whole contraption */
  4635.  
  4636.          case TriStateButtons:
  4637.              key byte = TriStateButtonsID;
  4638.              byte = $$CountOf(threeStateArray);          /* # of buttons */
  4639.              cstring;                                    /* option returned */
  4640.              wide array threeStateArray {
  4641.                  align word;
  4642.                  rect;                                   /* bounds */
  4643.                  cstring;                                /* title */
  4644.                  cstring;                                /* string for Clear state */
  4645.                  cstring;                                /* string for DontTouch state */
  4646.                  cstring;                                /* string for Set state */
  4647.                  cstring;                                /* help text for button */
  4648.              };
  4649.  
  4650.          case List:      /* Puts up a list of "things" and allows multiple selections */
  4651.              key byte = ListID;
  4652.              byte        Volumes, ShellVars,
  4653.                          Windows, Aliases;               /* what to display in the list */
  4654.              cstring;                                    /* option to return before each "thing" */
  4655.              cstring;                                    /* title */
  4656.              align word;
  4657.              rect;                                       /* bounds of title */
  4658.              rect;                                       /* bounds of list selection box */
  4659.              cstring;                                    /* help text for selection box */
  4660.  
  4661.          case PictOrIcon:
  4662.              key byte = PictOrIconID;
  4663.              byte    Icon, Picture;                      /* display a picture or icon */
  4664.              int;                                        /* resource id of icon/picture */
  4665.              rect;                                       /* display bounds */
  4666.  
  4667.          case Dummy:
  4668.              key byte = DummyID;
  4669.  
  4670.          case DoItButton:                                /* Allows the 'do it' button to be dependent */
  4671.              key byte = DoItButtonID;
  4672.  
  4673.          case VersionDialog:                             /* Display a dialog when the version # is clicked */
  4674.              key byte = VersionDialogID;
  4675.              switch {
  4676.                  case VersionString:                     /* Version string embedded right here */
  4677.                      key byte = 0;
  4678.                      cstring;                            /* Version string of tool (e.g. V2.0) */
  4679.                  
  4680.                  case VersionResource:                   /* Versions string comes from another resource */
  4681.                      key byte = 1;
  4682.                      literal longint;                    /* resource type of pascal string containing version string */
  4683.                      integer;                            /* resource id of version string */
  4684.              };
  4685.              cstring;                                    /* Version text for help window */
  4686.              align word;
  4687.              integer     noDialog;                       /* Rsrc id of 'DLOG' */
  4688.                  /* NOTE •1: if there is no modal dialog to display when the version
  4689.                     string is clicked, set the rsrc id to zero (noDialog).
  4690.  
  4691.                     NOTE •2: if the version string comes from another resource (VersionResource),
  4692.                     the string must be the first thing in the resource and the string must be 
  4693.                     a pascal-style string.  A 'STR ' resource is an example of a resource that
  4694.                     fits the bill.
  4695.                     
  4696.                     NOTE •3: if the modal dialog is to have a filter proc, the proc
  4697.                     must be linked as a 'fltr' resource with the same resource id
  4698.                     as the dialog. */
  4699.      };
  4700.      align word;
  4701.  };
  4702.  align word;
  4703.   };
  4704. };
  4705.  
  4706. æKY mxwt
  4707. æC  /*
  4708.   'mxwt' is a new resource type for templates. The only difference is a word count for the
  4709.    number of fields in a type. 'mxbt' used a byte count. 'mxbt' is still supported.
  4710.    However, you need the word count if you want to use ResEdit to create templates.
  4711. */
  4712.  
  4713. type 'mxwt'{
  4714.  integer = $$CountOf(templates);                 /* Number of templates               */
  4715.  array templates { pString;                      /* Type name                         */
  4716.                    integer = $$CountOf(fields);  /* Number of fields in this template */
  4717.                    array fields { pString;       /* Field name                        */
  4718.                                   pString;       /* Field type                        */
  4719.                                   integer;       /* Number of fields of this type     */
  4720.                                 };
  4721.                  };
  4722. };
  4723.  
  4724. resource 'mxwt' (100) {
  4725.  {
  4726.  
  4727.  /* Sample shows all possible types:
  4728.  "Sample", {
  4729.      "Byte",             "Byte",             1,
  4730.      "Signed Byte",      "SignedByte",       1,
  4731.      "Unsigned Byte",    "UnsignedByte",     1,
  4732.      "Align to word",    "Align",            1,
  4733.      "Word",             "Word",             1,
  4734.      "Signed Word",      "SignedWord",       1,
  4735.      "Unsigned Word",    "UnsignedWord",     1,
  4736.      "Long",             "Long",             1,
  4737.      "Signed Long",      "SignedLong",       1,
  4738.      "Unsigned Long",    "UnsignedLong",     1,
  4739.      "Boolean",          "Boolean",          1,
  4740.      "Padding",          "Skip",             1,
  4741.      "Pascal string",    "pString",          10,
  4742.      "C string",         "cString",          1,
  4743.      "Align to word",    "Align",            1,
  4744.      "Text",             "Text",             4,
  4745.      "Handle",           "Handle",           1,
  4746.      "Next",             "^Sample",          1
  4747.      },
  4748.  */
  4749.  
  4750.  "BitMap", {
  4751.      "baseAddr",         "Long",             1,
  4752.      "rowBytes",         "Word",             1,
  4753.      "bounds",           "Word",             4
  4754.      },
  4755.  
  4756.  "GrafPort", {
  4757.      "device",           "word",             1,
  4758.      "portBits",         "BitMap",           1,
  4759.      "portRect",         "Word",             4,
  4760.      "visRgn",           "Handle",           1,
  4761.      "clipRgn",          "Handle",           1,
  4762.      "bkPat",            "Byte",             8,
  4763.      "fillPat",          "Byte",             8,
  4764.      "pnLoc",            "Word",             2,
  4765.      "pnSize",           "Word",             2,
  4766.      "pnMode",           "Word",             1,
  4767.      "pnPat",            "Byte",             8,
  4768.      "pnVis",            "Word",             1,
  4769.      "txFont",           "Word",             1,
  4770.      "txFace",           "Word",             1,
  4771.      "txMode",           "Word",             1,
  4772.      "txSize",           "Word",             1,
  4773.      "",                 "Skip",             4,
  4774.      "fgColor",          "Long",             1,
  4775.      "bkColor",          "Long",             1,
  4776.      "colrBit",          "Word",             1,
  4777.      "patStretch",       "Word",             1,
  4778.      "picSave",          "Handle",           1,
  4779.      "rgnSave",          "Handle",           1,
  4780.      "polySave",         "Handle",           1,
  4781.      "grafProcs",        "Long",             1
  4782.      },
  4783.  
  4784.  "WindowRecord", {
  4785.      "",                 "Skip",             16,
  4786.      "portRect",         "Word",             4,
  4787.      "visRgn",           "Handle",           1,
  4788.      "clipRgn",          "Handle",           1,
  4789.      "",                 "Skip",             76,
  4790.      "windowKind",       "Word",             1,
  4791.      "visible",          "Boolean",          1,
  4792.      "hilited",          "Boolean",          1,
  4793.      "goAwayFlag",       "Boolean",          1,
  4794.      "spareFlag",        "Boolean",          1,
  4795.      "strucRgn",         "Handle",           1,
  4796.      "contRgn",          "Handle",           1,
  4797.      "updateRgn",        "Handle",           1,
  4798.      "windowDefProc",    "Handle",           1,
  4799.      "dataHandle",       "Handle",           1,
  4800.      "titleHandle",      "^^PString",        1,
  4801.      "titleWidth",       "Word",             1,
  4802.      "controlList",      "Handle",           1,
  4803.      "nextWindow",       "^WindowRecord",    1,
  4804.      "windowPic",        "Handle",           1,
  4805.      "refCon",           "Long",             1
  4806.      },
  4807.  
  4808.  "TERec", {
  4809.      "destRect",         "Word",             4,
  4810.      "viewRect",         "Word",             4,
  4811.      "selRect",          "Word",             4,
  4812.      "lineHeight",       "Word",             1,
  4813.      "fontAscent",       "Word",             1,
  4814.      "selPoint",         "Word",             2,
  4815.      "selStart",         "Word",             1,
  4816.      "selEnd",           "Word",             1,
  4817.      "active",           "Word",             1,
  4818.      "wordBreak",        "Long",             1,
  4819.      "clikLoop",         "Long",             1,
  4820.      "clickTime",        "Long",             1,
  4821.      "clickLoc",         "Word",             1,
  4822.      "caretTime",        "Long",             1,
  4823.      "caretState",       "Word",             1,
  4824.      "just",             "Word",             1,
  4825.      "teLength",         "Word",             1,
  4826.      "hText",            "Handle",           1,
  4827.      "recalBack",        "Word",             1,
  4828.      "recalLines",       "Word",             1,
  4829.      "clikStuff",        "Word",             1,
  4830.      "crOnly",           "Word",             1,
  4831.      "txFont",           "Word",             1,
  4832.      "txFace",           "Byte",             1,
  4833.      "",                 "Align",            1;
  4834.      "txMode",           "Word",             1,
  4835.      "txSize",           "Word",             1,
  4836.      "inPort",           "^GrafPort",        1,
  4837.      "highHook",         "Long",             1,
  4838.      "caretHook",        "Long",             1,
  4839.      "nLines",           "Word",             1,
  4840.      "lineStarts",       "Word",             20  /* Actually, there can be 16001 of these */
  4841.      },
  4842.  
  4843.  "IOPB", {
  4844.      "qLink",            "Long",             1,
  4845.      "qType",            "Word",             1,
  4846.      "ioTrap",           "Word",             1,
  4847.      "ioCmdAddr",        "Long",             1,
  4848.      "ioCompletion",     "Long",             1,
  4849.      "ioResult",         "Word",             1,
  4850.      "ioNamePtr",        "^PString",         1,
  4851.      "ioVRefNum",        "Word",             1,
  4852.      "ioRefNum",         "Word",             1,
  4853.      "ioVersNum",        "SignedByte",       1,
  4854.      "ioPermssn",        "SignedByte",       1,
  4855.      "ioMisc",           "Long",             1,
  4856.      "ioBuffer",         "Long",             1,
  4857.      "ioReqCount",       "Long",             1,
  4858.      "ioActCount",       "Long",             1,
  4859.      "ioPosMode",        "Word",             1,
  4860.      "ioPosOffset",      "Long",             1
  4861.      },
  4862.  
  4863.  "Zone", {
  4864.      "bkLim",            "Long",             1,
  4865.      "purgePtr",         "Long",             1,
  4866.      "hFstFree",         "Long",             1,
  4867.      "zcbFree",          "Long",             1,
  4868.      "gzProc",           "Long",             1,
  4869.      "moreMast",         "Word",             1,
  4870.      "flags",            "Word",             1,
  4871.      "",                 "Skip",             16, /* Unused count fields */
  4872.      "purgeProc",        "Long",             1,
  4873.      "sparePtr",         "Long",             1,
  4874.      "allocPtr",         "Long",             1
  4875.      },
  4876.  
  4877.  "VCB", {
  4878.      "qLink",            "Long",             1,
  4879.      "qType",            "Word",             1,
  4880.      "vcbFlags",         "Word",             1,
  4881.      "vcbSigWord",       "Word",             1,
  4882.      "vcbCrDate",        "Long",             1,
  4883.      "vcbLsBkUp",        "Long",             1,
  4884.      "vcbAtrb",          "Word",             1,
  4885.      "vcbNmFls",         "Word",             1,
  4886.      "vcbDirSt",         "Word",             1,
  4887.      "vcbBlLn",          "Word",             1,
  4888.      "vcbNmBlks",        "Word",             1,
  4889.      "vcbAlBlkSiz",      "Long",             1,
  4890.      "vcbClpSiz",        "Long",             1,
  4891.      "vcbAlBlSt",        "Word",             1,
  4892.      "vcbNxtFNum",       "Long",             1,
  4893.      "vcbFreeBks",       "Word",             1,
  4894.      "vcbVN",            "PString",          27,
  4895.      "",                 "Align",            1,
  4896.      "vcbDrvNum",        "Word",             1,
  4897.      "vcbDRefNum",       "Word",             1,
  4898.      "vcbFSID",          "Word",             1,
  4899.      "vcbVRefNum",       "Word",             1,
  4900.      "vcbMAdr",          "Long",             1,
  4901.      "vcbBufAdr",        "Long",             1,
  4902.      "vcbMLen",          "Word",             1,
  4903.      "vcbDirIndex",      "Word",             1,
  4904.      "vcbDirBlk",        "Word",             1
  4905.      },
  4906.  
  4907.  "ControlRecord", {
  4908.      "nextControl",      "^^ControlRecord",  1,
  4909.      "contrlOwner",      "Long",             1,
  4910.      "contrlRect",       "Word",             4,
  4911.      "contrlVis",        "Byte",             1,
  4912.      "contrlHilite",     "Byte",             1,
  4913.      "contrlValue",      "Word",             1,
  4914.      "contrlMin",        "Word",             1,
  4915.      "contrlMax",        "Word",             1,
  4916.      "contrlDefProc",    "Handle",           1,
  4917.      "contrlData",       "Handle",           1,
  4918.      "contrlAction",     "Long",             1,
  4919.      "contrlRfCon",      "Long",             1,
  4920.      "contrlTitle",      "PString",          0
  4921.      },
  4922.  
  4923.  "DialogRecord", {
  4924.      "window",           "WindowRecord",     1,
  4925.      "items",            "Handle",           1,
  4926.      "textH",            "^^TERec",          1,
  4927.      "editField",        "Word",             1,
  4928.      "editOpen",         "Word",             1,
  4929.      "aDefItem",         "Word",             1
  4930.      },
  4931.  
  4932.  "EventRecord", {
  4933.      "what",             "Word",             1,
  4934.      "message",          "Long",             1,
  4935.      "when",             "Long",             1,
  4936.      "where",            "Word",             2,
  4937.      "modifiers",        "Word",             1
  4938.      },
  4939.  
  4940.  "SFReply", {
  4941.      "good",             "Boolean",          1,
  4942.      "copy",             "Boolean",          1,
  4943.      "fType",            "Text",             4,
  4944.      "vRefNum",          "Word",             1,
  4945.      "version",          "Word",             1,
  4946.      "fName",            "PString",          0
  4947.      },
  4948.  
  4949.  "MenuInfo", {
  4950.      "menuID",           "Word",             1,
  4951.      "menuWidth",        "Word",             1,
  4952.      "menuHeight",       "Word",             1,
  4953.      "menuProc",         "Long",             1,
  4954.      "enableFlags",      "Long",             1,
  4955.      "menuData",         "PString",          0
  4956.      },
  4957.  
  4958.  "FontRec",  {
  4959.      "fontType",         "Word",             1,
  4960.      "firstChar",        "Word",             1,
  4961.      "lastChar",         "Word",             1,
  4962.      "widMax",           "Word",             1,
  4963.      "kernMax",          "SignedWord",       1,
  4964.      "nDescent",         "SignedWord",       1,
  4965.      "fRectWidth",       "Word",             1,
  4966.      "fRectHeight",      "Word",             1,
  4967.      "owTLoc",           "Word",             1,
  4968.      "ascent",           "Word",             1,
  4969.      "descent",          "Word",             1,
  4970.      "leading",          "Word",             1,
  4971.      "rowWords",         "Word",             1,
  4972.      "bitImage",         "Byte",             16,
  4973.      "bitImage",         "Byte",             16,
  4974.      "bitImage",         "Byte",             16,
  4975.      "bitImage",         "Byte",             16
  4976.      },
  4977.  
  4978.   "ListRec", {
  4979.      "rview",            "Word",             4,
  4980.      "portPtr",          "Long",             1,
  4981.      "indent",           "Word",             2,
  4982.      "cellSize",         "Word",             2,
  4983.      "visible",          "Word",             4,
  4984.      "vScroll",          "Handle",           1,
  4985.      "hScroll",          "Handle",           1,
  4986.      "selFlags",         "Byte",             1,
  4987.      "lActive",          "Boolean",          1,
  4988.      "lReserved",        "Byte",             1,
  4989.      "listFlags",        "Byte",             1,
  4990.      "clikTime",         "Long",             1,
  4991.      "clikLoc",          "Word",             2,
  4992.      "mouseLoc",         "Word",             2,
  4993.      "lClikLoop",        "Long",             1,
  4994.      "lastClick",        "Word",             2,
  4995.      "refCon",           "Long",             1,
  4996.      "listDefProc",      "Handle",           1,
  4997.      "userHandle",       "Handle",           1,
  4998.      "dataBounds",       "Word",             4,
  4999.      "cells",            "Handle",           1,
  5000.      "maxIndex",         "Word",             1,
  5001.      "cellArray",        "Word",             16
  5002.      },
  5003.  
  5004.   /* "DM A6+14 Stack" will display the parameters and locals on the stack */
  5005.   "Stack", {
  5006.      "Param 1",          "Long",             1,
  5007.      "Param 2",          "Long",             1,
  5008.      "Param 3",          "Long",             1,
  5009.      "Param 4",          "Long",             1,
  5010.      "",                 "Skip",             8,  /* Skip return address and A6 */
  5011.      "Local 1",          "Long",             1,
  5012.      "Local 2",          "Long",             1,
  5013.      "Local 3",          "Long",             1,
  5014.      "Local 4",          "Long",             1
  5015.      },
  5016.  },
  5017. };
  5018.  
  5019. æKY mxbm 
  5020. æC  type 'mxbm'{
  5021.  integer = $$CountOf(symbols);          /* Number of entries     */
  5022.  array symbols { pString; pString; };   /* Macro name; expansion */
  5023. };
  5024.  
  5025. resource 'mxbm' (100) {
  5026.     {   /* Useful command lines */
  5027.  
  5028.  /* Clear breakpoints, A-Trap breaks and then go */
  5029.  "GG",           "BRC;ATC;G",
  5030.  
  5031.  /* Break at the first instruction of a segment after loading it */
  5032.  "GS",           "SB 12D 1;G;T 2;SB 12D 0",
  5033.  
  5034.  /* Pop the return address of the stack and go to it */
  5035.  "RTS",          "PC = SP^;SP = SP + 4",
  5036.  
  5037.           /* Enter "GTO n" to go till offset n in the current procedure is reached */
  5038.      "GTO",          "GT :+",
  5039.  
  5040.           /* Enter "BRO n" to set a breakpoint at offset n in the current procedure */
  5041.      "BRO",          "BR :+",
  5042.  
  5043.  /* Displays the port assuming the A5 world is set up */
  5044.      "thePort",      "DM A5^^ WindowRecord",
  5045.  
  5046.           /* IJ disassembles starting from the destination of a JMP instruction */
  5047.      "IJ",           "IL (.+2)^",
  5048.  
  5049.  
  5050.  "ABusVars",         "02D8",
  5051.  "ACount",           "0A9A",
  5052.  "ADBBase",          "0CF8",
  5053.  "AGBHandle",        "0D1C",
  5054.  "AlarmState",       "021F",
  5055.  "ANumber",          "0A98",
  5056.  "ApFontID",         "0984",
  5057.  "App2Packs",        "0BC8",
  5058.  "ApplLimit",        "0130",
  5059.  "ApplScratch",      "0A78",
  5060.  "ApplZone",         "02AA",
  5061.  "AppPacks",         "0AB8",
  5062.  "AppParmHandle",    "0AEC",
  5063.  "ASCBase",          "0CC0",
  5064.  "AtalkHk1",         "0B14",
  5065.  "AtalkHk2",         "0B18",
  5066.  "AtMenuBottom",     "0A0C",
  5067.  "AuxCtlHead",       "0CD4",
  5068.  "AuxWinHead",       "0CD0",
  5069.  
  5070.  "BNMQHd",           "0B60",
  5071.  "BootDrive",        "0210",
  5072.  "BootMask",         "0B0E",
  5073.  "BootTmp8",         "0B36",
  5074.  "BtDskRfn",         "0B34",
  5075.  "BufPtr",           "010C",
  5076.  "BufTgDate",        "0304",
  5077.  "BufTgFBkNum",      "0302",
  5078.  "BufTgFFlg",        "0300",
  5079.  "BufTgFNum",        "02FC",
  5080.  
  5081.  "CaretTime",        "02F4",
  5082.  "ChooserBits",      "0946",
  5083.  "ChunkyDepth",      "0D60",
  5084.  "CkdDB",            "0340",
  5085.  "CloseOrnHook",     "0A88",
  5086.  "ColLines",         "0C22",
  5087.  "CoreEditVars",     "0954",
  5088.  "CPUFlag",          "012F",
  5089.  "CQDGlobals",       "0CCC",
  5090.  "CrsrAddr",         "0888",
  5091.  "CrsrBase",         "0898",
  5092.  "CrsrBusy",         "08CD",
  5093.  "CrsrCouple",       "08CF",
  5094.  "CrsrDevice",       "089C",
  5095.  "CrsrNew",          "08CE",
  5096.  "CrsrObscure",      "08D2",
  5097.  "CrsrPin",          "0834",
  5098.  "CrsrPtr",          "0D62",
  5099.  "CrsrRect",         "083C",
  5100.  "CrsrRow",          "08AC",
  5101.  "CrsrSave",         "088C",
  5102.  "CrsrScale",        "08D3",
  5103.  "CrsrState",        "08D0",
  5104.  "CrsrThresh",       "08EC",
  5105.  "CrsrVis",          "08CC",
  5106.  "CurActivate",      "0A64",
  5107.  "CurApName",        "0910",
  5108.  "CurApRefNum",      "0900",
  5109.  "CurDeactive",      "0A68",
  5110.  "CurDeKind",        "0A22",
  5111.  "CurDirStore",      "0398",
  5112.  "CurDragAction",    "0A46",
  5113.  "CurFMDenom",       "0994",
  5114.  "CurFMDevice",      "098E",
  5115.  "CurFMFace",        "098C",
  5116.  "CurFMFamily",      "0988",
  5117.  "CurFMInput",       "0988",
  5118.  "CurFMNeedBits",    "098D",
  5119.  "CurFMNumer",       "0990",
  5120.  "CurFMSize",        "098A",
  5121.  "CurJTOffset",      "0934",
  5122.  "CurMap",           "0A5A",
  5123.  "CurPageOption",    "0936",
  5124.  "CurPitch",         "0280",
  5125.  "CurrentA5",        "0904",
  5126.  "CurStackBase",     "0908",
  5127.  
  5128.  "DABeeper",         "0A9C",
  5129.  "DAStrings",        "0AA0",
  5130.  "DefltStack",       "0322",
  5131.  "DefVCBPtr",        "0352",
  5132.  "DeskCPat",         "0CD8",
  5133.  "DeskHook",         "0A6C",
  5134.  "SetOSDefKey",      "0CDC",
  5135.  "DeskPattern",      "0A3C",
  5136.  "DeskPort",         "09E2",
  5137.  "DeviceList",       "08A8",
  5138.  "DiskVars",         "0222",
  5139.  "DlgFont",          "0AFA",
  5140.  "DoubleTime",       "02F0",
  5141.  "DragFlag",         "0A44",
  5142.  "DragHook",         "09F6",
  5143.  "DragPattern",      "0A34",
  5144.  "DrMstrBlk",        "034C",
  5145.  "DrvQHdr",          "0308",
  5146.  "DSAlertRect",      "03F8",
  5147.  "DSAlertTab",       "02BA",
  5148.  "DSCtrAdj",         "0DA8",
  5149.  "DSDrawProc",       "0334",
  5150.  "DSErrCode",        "0AF0",
  5151.  "DskErr",           "0142",
  5152.  "DskRtnAdr",        "0124",
  5153.  "DskSwtchHook",     "03EA",
  5154.  "DskVerify",        "012C",
  5155.  "DskWr11",          "012F",
  5156.  "DSWndUpdate",      "015D",
  5157.  "DTQFlags",         "0D92",
  5158.  "DTQueue",          "0D92",
  5159.  "DTskQHdr",         "0D94",
  5160.  "DTskQTail",        "0D98",
  5161.  
  5162.  "EjectNotify",      "0338",
  5163.  "EndSRTPtr",        "0DB4",
  5164.  "ErCode",           "03A2",
  5165.  "EventQueue",       "014A",
  5166.  "EvtBufCnt",        "0154",
  5167.  "ExpandMem",        "02B6",
  5168.  "ExtFSHook",        "03E6",
  5169.  "ExtStsDT",         "02BE",
  5170.  
  5171.  "FCBSPtr",          "034E",
  5172.  "FDevDisable",      "0BB3",
  5173.  "FileVars",         "0340",
  5174.  "Filler3A",         "0214",
  5175.  "Finder",           "0261",
  5176.  "FinderName",       "02E0",
  5177.  "FLckUnlck",        "0348",
  5178.  "FlEvtMask",        "025E",
  5179.  "FlushOnly",        "0346",
  5180.  "FMDefaultSize",    "0987",
  5181.  "FMDotsPerInch",    "09B2",
  5182.  "FMExist",          "0D42",
  5183.  "FMgrOutRec",       "0998",
  5184.  "FMStyleTab",       "09B6",
  5185.  "FondID",           "0BC6",
  5186.  "FondState",        "0903",
  5187.  "FontFlag",         "015E",
  5188.  "FOutAscent",       "09A5",
  5189.  "FOutBold",         "099E",
  5190.  "FOutDenom",        "09AE",
  5191.  "FOutDescent",      "09A6",
  5192.  "FOutError",        "0998",
  5193.  "FOutExtra",        "09A4",
  5194.  "FOutFontHandle",   "099A",
  5195.  "FOutItalic",       "099F",
  5196.  "FOutLeading",      "09A8",
  5197.  "FOutNumer",        "09AA",
  5198.  "FOutRec",          "0998",
  5199.  "FOutShadow",       "09A3",
  5200.  "FOutULOffset",     "09A0",
  5201.  "FOutULShadow",     "09A1",
  5202.  "FOutULThick",      "09A2",
  5203.  "FOutUnused",       "09A9",
  5204.  "FOutWidMax",       "09A7",
  5205.  "FPState",          "0A4A",
  5206.  "FractEnable",      "0BF4",
  5207.  "FrcSync",          "0349",
  5208.  "FSBusy",           "0360",
  5209.  "FScaleDisable",    "0A63",
  5210.  "FScaleHFact",      "0BF6",
  5211.  "FScaleVFact",      "0BFA",
  5212.  "FSFCBLen",         "03F6",
  5213.  "FSQHdr",           "0360",
  5214.  "FSQHead",          "0362",
  5215.  "FSQTail",          "0366",
  5216.  "FSQueueHook",      "03E2",
  5217.  "FSTemp4",          "03DE",
  5218.  "FSTemp8",          "03D6",
  5219.  "FSVarEnd",         "03F6",
  5220.  
  5221.  "GetParam",         "01E4",
  5222.  "GhostWindow",      "0A84",
  5223.  "GotStrike",        "0986",
  5224.  "GrafBegin",        "0800",
  5225.  "GrafVar",          "0824",
  5226.  "GrayRgn",          "09EE",
  5227.  "GZMoveHnd",        "0330",
  5228.  "GZRootHnd",        "0328",
  5229.  "GZRootPtr",        "032C",
  5230.  
  5231.  "HeapEnd",          "0114",
  5232.  "HFSFlags",         "0376",
  5233.  "HiHeapMark",       "0BAE",
  5234.  "HiKeyLast",        "0216",
  5235.  "HiliteMode",       "0938",
  5236.  "HiliteRGB",        "0DA0",
  5237.  "HpChk",            "0316",
  5238.  "HWCfgFlags",       "0B22",
  5239.  
  5240.  "IAZNotify",        "033C",
  5241.  "IconBitmap",       "0A0E",
  5242.  "IconTLAddr",       "0DAC",
  5243.  "IntFlag",          "015F",
  5244.  "IntlSpec",         "0BA0",
  5245.  "IWM",              "01E0",
  5246.  
  5247.  "JAdrDisk",         "0252",
  5248.  "JAllocCrsr",       "088C",
  5249.  "JControl",         "0242",
  5250.  "JCrsrObscure",     "081C",
  5251.  "JCrsrTask",        "08EE",
  5252.  "JDCDReset",        "0B48",
  5253.  "JDiskPrime",       "0226",
  5254.  "JDiskSel",         "0B40",
  5255.  "jDTInstall",       "0D9C",
  5256.  "JFetch",           "08F4",
  5257.  "JFigTrkSpd",       "0222",
  5258.  "JFontInfo",        "08E4",
  5259.  "JGNEFilter",       "029A",
  5260.  "JHideCursor",      "0800",
  5261.  "JInitCrsr",        "0814",
  5262.  "JIODone",          "08FC",
  5263.  "JKybdTask",        "021A",
  5264.  "JMakeSpdTbl",      "024E",
  5265.  "JOpcodeProc",      "0894",
  5266.  "JournalFlag",      "08DE",
  5267.  "JournalRef",       "08E8",
  5268.  "JRdAddr",          "022A",
  5269.  "JRdData",          "022E",
  5270.  "JRecal",           "023E",
  5271.  "JReSeek",          "024A",
  5272.  "JScrnAddr",        "080C",
  5273.  "JScrnSize",        "0810",
  5274.  "JSeek",            "0236",
  5275.  "JSendCmd",         "0B44",
  5276.  "JSetCCrsr",        "0890",
  5277.  "JSetCrsr",         "0818",
  5278.  "JSetSpeed",        "0256",
  5279.  "JSetUpPoll",       "023A",
  5280.  "JShell",           "0212",
  5281.  "JShieldCursor",    "0808",
  5282.  "JShowCursor",      "0804",
  5283.  "JStash",           "08F8",
  5284.  "JSwapFont",        "08E0",
  5285.  "jSwapMMU",         "0DBC",
  5286.  "JUpdateProc",      "0820",
  5287.  "JVBLTask",         "0D28",
  5288.  "JWakeUp",          "0246",
  5289.  "JWrData",          "0232",
  5290.  
  5291.  "KbdLast",          "0218",
  5292.  "KbdType",          "021E",
  5293.  "KbdVars",          "0216",
  5294.  "Key1Trans",        "029E",
  5295.  "Key2Trans",        "02A2",
  5296.  "KeyLast",          "0184",
  5297.  "KeyMap",           "0174",
  5298.  "KeyMVars",         "0B04",
  5299.  "KeypadMap",        "017C",
  5300.  "KeyRepThresh",     "0190",
  5301.  "KeyRepTime",       "018A",
  5302.  "KeyThresh",        "018E",
  5303.  "KeyTime",          "0186",
  5304.  
  5305.  "LastDepth",        "0D40",
  5306.  "LastFond",         "0BC2",
  5307.  "LastFore",         "0D36",
  5308.  "LastLGlobal",      "0944",
  5309.  "LastMode",         "0D3E",
  5310.  "LastPGlobal",      "0954",
  5311.  "LastSPExtra",      "0B4C",
  5312.  "LastTGLobal",      "0AFC",
  5313.  "LastTxGDevice",    "0DC4",
  5314.  "LaunchFlag",       "0902",
  5315.  "LGrafJump",        "0824",
  5316.  "LoaderPBlock",     "093A",
  5317.  "LoadFiller",       "090C",
  5318.  "LoadTrap",         "012D",
  5319.  "LoadVars",         "0900",
  5320.  "Lvl1DT",           "0192",
  5321.  "Lvl2DT",           "01B2",
  5322.  
  5323.  "MacJmp",           "0120",
  5324.  "MacPgm",           "0316",
  5325.  "MAErrProc",        "0BE8",
  5326.  "MainDevice",       "08A4",
  5327.  "MaskBC",           "031A",
  5328.  "MaskHandle",       "031A",
  5329.  "MaskPtr",          "031A",
  5330.  "MASuperTab",       "0BEC",
  5331.  "MaxDB",            "0344",
  5332.  "MBarEnable",       "0A20",
  5333.  "MBarHeight",       "0BAA",
  5334.  "MBarHook",         "0A2C",
  5335.  "MBDFHndl",         "0B58",
  5336.  "MBSaveLoc",        "0B5C",
  5337.  "MBState",          "0172",
  5338.  "MBTicks",          "016E",
  5339.  "MemErr",           "0220",
  5340.  "MemTop",           "0108",
  5341.  "MenuCInfo",        "0D50",
  5342.  "MenuDisable",      "0B54",
  5343.  "MenuFlash",        "0A24",
  5344.  "MenuHook",         "0A30",
  5345.  "MenuList",         "0A1C",
  5346.  "MickeyBytes",      "0D6A",
  5347.  "MinStack",         "031E",
  5348.  "MMDefFlags",       "0326",
  5349.  "MmInOK",           "012E",
  5350.  "MMU32bit",         "0CB2",
  5351.  "MMUFlags",         "0CB0",
  5352.  "MMUFluff",         "0CB3",
  5353.  "MMUTbl",           "0CB4",
  5354.  "MMUTblSize",       "0CB8",
  5355.  "MMUType",          "0CB1",
  5356.  "MonkeyLives",      "0100",
  5357.  "Mouse",            "0830",
  5358.  "MouseMask",        "08D6",
  5359.  "MouseOffset",      "08DA",
  5360.  "MrMacHook",        "0A2C",
  5361.  "MTemp",            "0828",
  5362.  
  5363.      };
  5364. };
  5365.  
  5366.  
  5367. resource 'mxbm' (101) {
  5368. {"NewCrsrJTbl",      "088C",
  5369.  "NewMount",         "034A",
  5370.  "NewUnused",        "0BC0",
  5371.  "NiblTbl",          "025A",
  5372.  "NMIFlag",          "0C2C",
  5373.  "NxtDB",            "0342",
  5374.  
  5375.  "OldContent",       "09EA",
  5376.  "OldStructure",     "09E6",
  5377.  
  5378.  "PaintWhite",       "09DC",
  5379.  "Params",           "03A4",
  5380.  "pCDeskPat",        "020B",
  5381.  "PmgrHandle",       "0DC8",
  5382.  "PollProc",         "013E",
  5383.  "PollRtnAddr",      "0128",
  5384.  "PollStack",        "013A",
  5385.  "PortAUse",         "0290",
  5386.  "PortBUse",         "0291",
  5387.  "PortList",         "0D66",
  5388.  "PrintErr",         "0944",
  5389.  "PrintVars",        "0944",
  5390.  "PWMBuf1",          "0B0A",
  5391.  "PWMBuf2",          "0312",
  5392.  "PWMValue",         "0138",
  5393.  
  5394.  "QDColors",         "08B0",
  5395.  "QDErr",            "0D6E",
  5396.  "QDExist",          "08F3",
  5397.  
  5398.  "RAMBase",          "02B2",
  5399.  "RawMouse",         "082C",
  5400.  "RegRsrc",          "0347",
  5401.  "ReqstVol",         "03EE",
  5402.  "ResErr",           "0A60",
  5403.  "ResErrProc",       "0AF2",
  5404.  "ResLoad",          "0A5E",
  5405.  "ResReadOnly",      "0A5C",
  5406.  "RestProc",         "0A8C",
  5407.  "ResumeProc",       "0A8C",
  5408.  "RGBBlack",         "0C10",
  5409.  "RGBWhite",         "0C16",
  5410.  "RgSvArea",         "036A",
  5411.  "RMgrHiVars",       "0B80",
  5412.  "RMgrPerm",         "0BA4",
  5413.  "RndSeed",          "0156",
  5414.  "ROM85",            "028E",
  5415.  "ROMBase",          "02AE",
  5416.  "RomFont0",         "0980",
  5417.  "ROMMapHndl",       "0B06",
  5418.  "RomMapInsert",     "0B9E",
  5419.  "RowBits",          "0C20",
  5420.  "RSDHndl",          "028A",
  5421.  
  5422.  "SavedHandle",      "0A28",
  5423.  "SavedHilite",      "0D43",
  5424.  "SaveFondFlags",    "0986",
  5425.  "SaveProc",         "0A90",
  5426.  "SaveSegHandle",    "0930",
  5427.  "SaveSP",           "0A94",
  5428.  "SaveUpdate",       "09DA",
  5429.  "SaveVisRgn",       "09F2",
  5430.  "SCCASts",          "02CE",
  5431.  "SCCBSts",          "02CF",
  5432.  "SCCRd",            "01D8",
  5433.  "SCCWr",            "01DC",
  5434.  "ScrapCount",       "0968",
  5435.  "ScrapHandle",      "0964",
  5436.  "ScrapInfo",        "0960",
  5437.  "ScrapName",        "096C",
  5438.  "ScrapSize",        "0960",
  5439.  "ScrapState",       "096A",
  5440.  "ScrapTag",         "0970",
  5441.  "ScrapVars",        "0960",
  5442.  "Scratch20",        "01E4",
  5443.  "Scratch8",         "09FA",
  5444.  "ScrDmpEnb",        "02F8",
  5445.  "ScrDmpType",       "02F9",
  5446.  "ScreenBytes",      "0C24",
  5447.  "ScreenRow",        "0106",
  5448.  "ScreenVars",       "0292",
  5449.  "ScrHRes",          "0104",
  5450.  "ScrnBase",         "0824",
  5451.  "ScrnVBLPtr",       "0D10",
  5452.  "ScrVRes",          "0102",
  5453.  "SCSIBase",         "0C00",
  5454.  "SCSIDMA",          "0C04",
  5455.  "SCSIDrvrs",        "0B2E",
  5456.  "SCSIFlag",         "0B22",
  5457.  "SCSIGlobals",      "0C0C",
  5458.  "SCSIHsk",          "0C08",
  5459.  "SCSIPoll",         "0C2F",
  5460.  "SdEnable",         "0261",
  5461.  "SDMBusErr",        "0DC0",
  5462.  "SDMJmpTblPtr",     "0DB8",
  5463.  "SdVolume",         "0260",
  5464.  "SegHiEnable",      "0BB2",
  5465.  "SerialVars",       "02D0",
  5466.  "SEVarBase",        "0C30",
  5467.  "SEvtEnb",          "015C",
  5468.  "SFSaveDisk",       "0214",
  5469.  "SInfoPtr",         "0CBC",
  5470.  "SInitFlags",       "0D90",
  5471.  "SlotPrTbl",        "0D08",
  5472.  "SlotQDT",          "0D04",
  5473.  "SlotTICKS",        "0D14",
  5474.  "SlotVBLQ",         "0D0C",
  5475.  "SMGlobals",        "0CC4",
  5476.  "SmgrCore",         "0BA0",
  5477.  "SonyVars",         "0134",
  5478.  "SoundActive",      "027E",
  5479.  "SoundBase",        "0266",
  5480.  "SoundDCE",         "027A",
  5481.  "SoundGlue",        "0AE8",
  5482.  "SoundLevel",       "027F",
  5483.  "SoundPtr",         "0262",
  5484.  "SoundVars",        "0262",
  5485.  "SoundVBL",         "026A",
  5486.  "SPAlarm",          "0200",
  5487.  "SPATalkA",         "01F9",
  5488.  "SPATalkB",         "01FA",
  5489.  "SPClikCaret",      "0209",
  5490.  "SPConfig",         "01FB",
  5491.  "SPFont",           "0204",
  5492.  "SPKbd",            "0206",
  5493.  "SPMisc1",          "020A",
  5494.  "SPMisc2",          "020B",
  5495.  "SPPortA",          "01FC",
  5496.  "SPPortB",          "01FE",
  5497.  "SPPrint",          "0207",
  5498.  "SPValid",          "01F8",
  5499.  "SPVolCtl",         "0208",
  5500.  "SrcDevice",        "08A0",
  5501.  "SRsrcTblPtr",      "0D24",
  5502.  "StkLowPt",         "0110",
  5503.  "Switcher",         "0282",
  5504.  "SwitcherTPtr",     "0286",
  5505.  "SynListHandle",    "0D32",
  5506.  "SysCom",           "0100",
  5507.  "SysEvtBuf",        "0146",
  5508.  "SysEvtMask",       "0144",
  5509.  "SysFontFam",       "0BA6",
  5510.  "SysFontSize",      "0BA8",
  5511.  "SysMap",           "0A58",
  5512.  "SysMapHndl",       "0A54",
  5513.  "SysParam",         "01F8",
  5514.  "SysResName",       "0AD8",
  5515.  "SysVersion",       "015A",
  5516.  "SysZone",          "02A6",
  5517.  
  5518.  "T1Arbitrate",      "0B3F",
  5519.  "TableSeed",        "0D20",
  5520.  "TagData",          "02FA",
  5521.  "TaskLock",         "0A62",
  5522.  "TEDoText",         "0A70",
  5523.  "TempRect",         "09FA",
  5524.  "TERecal",          "0A74",
  5525.  "TEScrpHandle",     "0AB4",
  5526.  "TEScrpLength",     "0AB0",
  5527.  "TESysJust",        "0BAC",
  5528.  "TEWdBreak",        "0AF6",
  5529.  "TheCrsr",          "0844",
  5530.  "TheGDevice",       "0CC8",
  5531.  "TheMenu",          "0A26",
  5532.  "TheZone",          "0118",
  5533.  "Ticks",            "016A",
  5534.  "Time",             "020C",
  5535.  "TimeDBRA",         "0D00",
  5536.  "TimeSCCDB",        "0D02",
  5537.  "TimeSCSIDB",       "0DA6",
  5538.  "TimeVars",         "0B30",
  5539.  "TmpResLoad",       "0B9F",
  5540.  "Tocks",            "0173",
  5541.  "ToExtFS",          "03F2",
  5542.  "ToolScratch",      "09CE",
  5543.  "TopMapHndl",       "0A50",
  5544.  "TopMenuItem",      "0A0A",
  5545.  "TrapAgain",        "0B00",
  5546.  "Twitcher1",        "0B50",
  5547.  "Twitcher2",        "0B7C",
  5548.  
  5549.  "UnitNtryCnt",      "01D2",
  5550.  "UsedFWidths",      "0BF5",
  5551.  "UTableBase",       "011C",
  5552.  
  5553.  "VBLQueue",         "0160",
  5554.  "VCBQHdr",          "0356",
  5555.  "VertRRate",        "0D30",
  5556.  "VIA",              "01D4",
  5557.  "VIA2DT",           "0D70",
  5558.  "VideoInfoOK",      "0DB0",
  5559.  "VidMode",          "0C2E",
  5560.  "VidType",          "0C2D",
  5561.  
  5562.  "WarmStart",        "0CFC",
  5563.  "WidthListHand",    "08E4",
  5564.  "WidthPtr",         "0B10",
  5565.  "WidthTabHandle",   "0B2A",
  5566.  "WindowList",       "09D6",
  5567.  "WMgrCPort",        "0D2C",
  5568.  "WMgrPort",         "09DE",
  5569.  "WordRedraw",       "0BA5",
  5570.  "WWExist",          "08F2",
  5571.      };
  5572. };
  5573.  
  5574. type 'mxbm'{
  5575.  integer = $$CountOf(symbols);          /* Number of entries     */
  5576.  array symbols { pString; pString; };   /* Macro name; expansion */
  5577. };
  5578.  
  5579.  
  5580. /* These macros enable you to type "ATB ListManagerCall" as if ListManagerCall was a trap */
  5581.  
  5582. resource 'mxbm' (104) {
  5583.    {
  5584.  "LActivate",        "Pack0 SP^.W=#0",
  5585.  "LAddColumn",       "Pack0 SP^.W=#4",
  5586.  "LAddRow",          "Pack0 SP^.W=#8",
  5587.  "LAddToCell",       "Pack0 SP^.W=#12",
  5588.  "LAutoScroll",      "Pack0 SP^.W=#16",
  5589.  "LCellSize",        "Pack0 SP^.W=#20",
  5590.  "LClick",           "Pack0 SP^.W=#24",
  5591.  "LClrCell",         "Pack0 SP^.W=#28",
  5592.  "LDelColumn",       "Pack0 SP^.W=#32",
  5593.  "LDelRow",          "Pack0 SP^.W=#36",
  5594.  "LDispose",         "Pack0 SP^.W=#40",
  5595.  "LDoDraw",          "Pack0 SP^.W=#44",
  5596.  "LDraw",            "Pack0 SP^.W=#48",
  5597.  "LFind",            "Pack0 SP^.W=#52",
  5598.  "LGetCell",         "Pack0 SP^.W=#56",
  5599.  "LGetSelect",       "Pack0 SP^.W=#60",
  5600.  "LLastClick",       "Pack0 SP^.W=#64",
  5601.  "LNew",             "Pack0 SP^.W=#68",
  5602.  "LNextCell",        "Pack0 SP^.W=#72",
  5603.  "LRect",            "Pack0 SP^.W=#76",
  5604.  "LScroll",          "Pack0 SP^.W=#80",
  5605.  "LSearch",          "Pack0 SP^.W=#84",
  5606.  "LSetCell",         "Pack0 SP^.W=#88",
  5607.  "LSetSelect",       "Pack0 SP^.W=#92",
  5608.  "LSize",            "Pack0 SP^.W=#96",
  5609.  "LUpdate",          "Pack0 SP^.W=#100",
  5610.    };
  5611. };
  5612.  
  5613. æKY mxbi
  5614. æC  This resource initializes MacsBug options for:
  5615.  
  5616.  • The number of traps that are recorded using ATR/ATP commands
  5617.  • The number of lines in the PC window
  5618.  • The number of bytes used to save the command history
  5619.  
  5620. If no mxbi resource is found then MacsBug defaults to:
  5621.  
  5622.  • 16 traps recorded
  5623.  • 2  lines in the PC window
  5624.  • 2K bytes of command history
  5625.  
  5626. */
  5627.  
  5628. type 'mxbi' { integer; integer; integer; };
  5629.  
  5630. resource 'mxbi' (0) {
  5631.      16,     /* Record the last 16 traps */
  5632.  2,      /* Display the procedure name and one disassembled lines */
  5633.  2048;   /* Save 2K bytes of command output for later review */
  5634. };
  5635.  
  5636.  
  5637.  
  5638. type 'mxbm'{
  5639.  integer = $$CountOf(symbols);          /* Number of entries     */
  5640.  array symbols { pString; pString; };   /* Macro name; expansion */
  5641. };
  5642.  
  5643.  
  5644. /* These macros enable you to type "ATB HFSCall" as if HFSCall was a trap */
  5645.  
  5646. resource 'mxbm' (103) {
  5647.    {
  5648.  "OpenWD",       "HFSDispatch D0.W=#1",
  5649.  "CloseWD",      "HFSDispatch D0.W=#2",
  5650.  "CatMove",      "HFSDispatch D0.W=#5",
  5651.  "DirCreate",    "HFSDispatch D0.W=#6",
  5652.  "GetWDInfo",    "HFSDispatch D0.W=#7",
  5653.  "GetFCBInfo",   "HFSDispatch D0.W=#8",
  5654.  "GetCatInfo",   "HFSDispatch D0.W=#9",
  5655.  "SetCatInfo",   "HFSDispatch D0.W=#10",
  5656.  "SetVolInfo",   "HFSDispatch D0.W=#11",
  5657.  "LockRgn",      "HFSDispatch D0.W=#16",
  5658.  "UnlockRgn",    "HFSDispatch D0.W=#17",
  5659.    };
  5660. };
  5661.  
  5662.  
  5663. type 'mxbm'{
  5664.  integer = $$CountOf(symbols);          /* Number of entries     */
  5665.  array symbols { pString; pString; };   /* Macro name; expansion */
  5666. };
  5667.  
  5668.  
  5669. /* These macros enable you to type "ATB FO<name>" as if FO<name> was a trap */
  5670.  
  5671. resource 'mxbm' (102) {
  5672.    {
  5673.  "FOADD",        "FP68K (SP+1)^.B=0",
  5674.  "FOSUB",        "FP68K (SP+1)^.B=2",
  5675.  "FOMUL",        "FP68K (SP+1)^.B=4",
  5676.  "FODIV",        "FP68K (SP+1)^.B=6",
  5677.  "FOCMP",        "FP68K (SP+1)^.B=9",
  5678.  "FOCPX",        "FP68K (SP+1)^.B=A",
  5679.  "FOREM",        "FP68K (SP+1)^.B=C",
  5680.  "FOZ2X",        "FP68K (SP+1)^.B=E",
  5681.  "FOX2Z",        "FP68K (SP+1)^.B=10",
  5682.  "FOSQRT",       "FP68K (SP+1)^.B=12",
  5683.  "FORTI",        "FP68K (SP+1)^.B=14",
  5684.  "FOTTI",        "FP68K (SP+1)^.B=16",
  5685.  "FOSCALB",      "FP68K (SP+1)^.B=18",
  5686.  "FOLOGB",       "FP68K (SP+1)^.B=1A",
  5687.  "FOCLASS",      "FP68K (SP+1)^.B=1C",
  5688.  
  5689.  "FOSETENV",     "FP68K (SP+1)^.B=1",
  5690.  "FOGETENV",     "FP68K (SP+1)^.B=3",
  5691.  "FOSETHV",      "FP68K (SP+1)^.B=5",
  5692.  "FOGETHV",      "FP68K (SP+1)^.B=7",
  5693.  "FOD2B",        "FP68K (SP+1)^.B=9",
  5694.  "FOB2D",        "FP68K (SP+1)^.B=B",
  5695.  "FONEG",        "FP68K (SP+1)^.B=D",
  5696.  "FOABS",        "FP68K (SP+1)^.B=F",
  5697.  "FOCPYSGN",     "FP68K (SP+1)^.B=11",
  5698.  "FONEXT",       "FP68K (SP+1)^.B=13",
  5699.  "FOSETXCP",     "FP68K (SP+1)^.B=15",
  5700.  "FOPROCENTRY",  "FP68K (SP+1)^.B=17",
  5701.  "FOPROCEXIT",   "FP68K (SP+1)^.B=19",
  5702.  "FOTESTXCP",    "FP68K (SP+1)^.B=1B",
  5703.  
  5704.  "FOLNX",        "ELEMS68K (SP+1)^.B=0",
  5705.  "FOLOG2X",      "ELEMS68K (SP+1)^.B=2",
  5706.  "FOLN1X",       "ELEMS68K (SP+1)^.B=4",
  5707.  "FOLOG21X",     "ELEMS68K (SP+1)^.B=6",
  5708.  "FOEXPX",       "ELEMS68K (SP+1)^.B=8",
  5709.  "FOEXP2X",      "ELEMS68K (SP+1)^.B=A",
  5710.  "FOEXP1X",      "ELEMS68K (SP+1)^.B=C",
  5711.  "FOEXP21X",     "ELEMS68K (SP+1)^.B=C",
  5712.  "FOXPWRI",      "ELEMS68K (SP+1)^.B=10",
  5713.  "FOXPWRY",      "ELEMS68K (SP+1)^.B=12",
  5714.  "FOCOMPOUND",   "ELEMS68K (SP+1)^.B=14",
  5715.  "FOANNUITY",    "ELEMS68K (SP+1)^.B=16",
  5716.  "FOSINX",       "ELEMS68K (SP+1)^.B=18",
  5717.  "FOCOSX",       "ELEMS68K (SP+1)^.B=1A",
  5718.  "FOTANX",       "ELEMS68K (SP+1)^.B=1C",
  5719.  "FOATANX",      "ELEMS68K (SP+1)^.B=1E",
  5720.  "FORANDX",      "ELEMS68K (SP+1)^.B=20",
  5721.  
  5722.  "FOPSTR2DEC",   "DecStr68K (SP+1)^.B=2",
  5723.  "FOCSTR2DEC",   "DecStr68K (SP+1)^.B=4",
  5724.  "FODEC2STRC",   "DecStr68K (SP+1)^.B=3",
  5725.    };
  5726. };
  5727.  
  5728. æKY mxbc 
  5729. æC  This resource sets the foreground and background colors for the MacsBug display.
  5730. The default is black characters on a white background.
  5731.  
  5732. */
  5733.  
  5734. type 'mxbc' { integer; integer; integer; integer; integer; integer; };
  5735.  
  5736. resource 'mxbc' (0) {
  5737.      $FFFF,    /* Background Red   */
  5738.      $FFFF,    /*            Green */
  5739.      $FFFF,    /*            Blue  */
  5740.      $0,       /* Foreground Red   */
  5741.      $0,       /*            Green */
  5742.      $0,       /*            Blue  */
  5743. };
  5744.  
  5745.  
  5746.  
  5747.